From: Jim Weirich Date: 2006-06-27T06:20:49+09:00 Subject: Re: Unicode roadmap? Thanks for the response, Austin. It seemed to help clearify the issues (at least for me). Austin Ziegler wrote: > d1 = File.open("file.txt", "rb", encoding: :utf8) { |f| f.read } Question: Does the encoding parameter specify the encoding of the file, or the encoding of the strings you get back (my guess is both). Related question: In environments that use a lot of different encodings, are there ways or conventions for specifying the encoding, or do you just have to "know". > s1.encoding = :utf8 Another Question: When you set the encoding, are you: (A) Just changing the encoding specifier without changing the underlaying string. (B) Re-encoding the string according to the new encoding specifier. (B) seems to be implied by the attribute notation, but that seems a bit dangerous in my mind. Thanks. -- Jim Weirich -- Posted via http://www.ruby-forum.com/.