On Jun 22, 3:23 pm, Matt Jones <[email protected]> wrote:
> You might want to try passing the :encoding => 'n' option to FasterCSV
> and see what that does; getting Windows-1252 characters to display
> correctly on other platforms is left as an exercise.. :)
If it is indeed the case that your accented characters are coming out
in ISO8859-1, consider converting the character set in your input
first:
csv_data = Iconv.iconv('utf-8', 'ISO_8859-1', file.read).to_s,
Frankly the whole thing seems rather like black magic to me, but the
above seems to solve the problem I was having with Excel files in a
CSV importer that I've recently created.
-Matt
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---