Abinoam Jr. wrote in post #1135236:

> Feel free to ask if it's not clear yet.
> The encoding problem is complex (but the solution we have in Ruby is
> simple IMHO).
> I'm a native portuguese speaker and have to rely on good encoding
> support.


One line from the file gave me so much trouble, once. I fixed it as 
below

data_line.chomp.force_encoding('windows-1252').encode('utf-8')

But before doing this - I tried first

(a) data_line.chomp.encoding('utf-8')
(b) data_line.chomp.force_encoding('utf-8')

Then finally

data_line.chomp.force_encoding('windows-1252').encode('utf-8') worked.

Why a and b attempt didn't work ? As I told you earlier, I always fixed 
it using "trial and error" method.

Can you explain this ? May be with your help, I can make my base much 
strong, in such encoding related issue

-- 
Posted via http://www.ruby-forum.com/.