Using Ruby 1.8 (for Rails 2.3.5)
I have a cvs file that was exported from an Excel file.
Some of the text contains characters like â€œTest in quotesâ€ (I think
these are smart quotes)
I can properly change this to UTF-8 via:
Iconv.conv(“utf-8”, “cp1251”, text)
Other text contains text like spanish characters like SeÃ±ora. I can
properly change this to UTF-8 like this:
Iconv.conv(“utf-8”, “iso-8859-1”, text)
However I cannot figure out how to get some text that has both types of
characters like this:
â€œTest in quotesâ€ SeÃ±ora
If I don’t get these properly into utf-8 they do not persist properly in
mysql (they appear as ?)
Any ideas? Any help is greatly appreciated.
Thanks in advance.