Reading files in UTF-8

Hello everybody,

I am deseperatly trying to read file encoded in UTF-8, to populate
the Globalize database. But it seems that the UTF-8 encoding is not
recognized, and read as an ASCII char. Is there any specific
manipulation to do to achieve this?
Thanks in advance for any help…

Thomas L.
http://www.8motions.com

Hi,

At Wed, 5 Sep 2007 04:55:04 +0900,
tomsoft wrote in [ruby-talk:267587]:

I am deseperatly trying to read file encoded in UTF-8, to populate
the Globalize database. But it seems that the UTF-8 encoding is not
recognized, and read as an ASCII char. Is there any specific
manipulation to do to achieve this?

UTF-8 is ASCII compatible, so if your data don’t contain any
multi-byte sequences, they should seem like as ASCII data.

tomsoft wrote:

Hello everybody,

I am deseperatly trying to read file encoded in UTF-8, to populate
the Globalize database. But it seems that the UTF-8 encoding is not
recognized, and read as an ASCII char. Is there any specific
manipulation to do to achieve this?
Thanks in advance for any help…
require ‘iconv’ is your friend.

http://ruby-doc.org/stdlib/libdoc/iconv/rdoc/index.html