I have this CSV upload feature on this rails site I'm working on. The
CSV file contains all kinds of French, and Italian words that are
uploaded into the DB. The problem I'm having is after the words are
uploaded, some of the characters are changes to either the little
diamond question mark thing, or the box with the 4 small digits in it,
or just another letter altogether.
The CSV is iso-8859-1. I've changed the database.yml to encoding:
latin1, tried running 'alter table words charset=latin1;' in mysql. I've
tried using string.force_encoding(Encoding::ISO_8859_1) when saving, and
even wrote a method in the String class
Iconv.conv('ISO-8859-1', 'utf-8', self)
I even have the <meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1" /> in my layout....
So, what are the best steps to take a .CSV file that is full of
ISO-8859-1 characters, and upload it to the DB so they are displayed
exactly how they are in the file?
In case anyone knows.... The CSV file is being created with Microsoft
Excel. Is there a way to save the file as UTF-8 so I can just move on
with my life?
Thanks for the help,