From: Roger Pack Date: 2010-07-27T21:05:21+09:00 Subject: Re: broken UTF-8 string Peter Eldo wrote: > begin > File.new(path_file,"r").each { |line| > puts line > } > rescue > puts "Error read file #{subor}: #{$!}" > next > end > > In Ruby 1.9: broken UTF-8 string > In Ruby 1.9.1: invalid byte sequence in UTF-8 > > Read files is mail in other codepage, example 1251, 1250 or 88952-2, > 88592-1 utf-8 I believe you specify the encoding within the File.new(path_file, xxx) viz: http://stackoverflow.com/questions/1378185/how-to-specify-output-file-encoding-in-ruby -- Posted via http://www.ruby-forum.com/.