From: Brian Candler Date: 2012-09-20T17:03:18+09:00 Subject: Re: Encoding question Brian Candler wrote in post #1076773: >> f = File.open('somefile.txt', 'r:iso-8859-1') ... > *No* transcoding takes place in the above example, regardless of the > where it runs; the data is read into the string as-is. However, every > String which you read from the file using f.gets or f.getc is marked to > say that it is encoded using UTF-8. I meant to say ISO-8859-1 not UTF-8 there. The point remains, the string remains the same sequence bytes of ISO-8859-1 encoded characters. If you want it transcoded to UTF-8, you have to ask for this by giving a second encoding. -- Posted via http://www.ruby-forum.com/.