From: ashbb Date: 2012-05-21T23:31:29+09:00 Subject: Re: reading from and writing to a Unicode encoded file - issues when using Shoes --90e6ba2121f7e607f604c08cc1a3 Content-Type: text/plain; charset=ISO-8859-1 Hi Sebastjan, Ah, sorry. Try out the following again: data=nil #open(file, "r") {|fin| data=fin.read() } data = IO.read(file).force_encoding("UTF-8") open(file, "w:UTF-8") { |fout| fout.write(data) } if data ashbb --90e6ba2121f7e607f604c08cc1a3 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi Sebastjan,

Ah, sorry. Try out the following again:

=A0=A0= =A0=A0=A0 data=3Dnil
=A0=A0=A0=A0=A0 #open(file, "r") {|fin| d= ata=3Dfin.read() }
=A0=A0=A0=A0=A0 data =3D IO.read(file).force_encoding= ("UTF-8")
=A0=A0=A0=A0=A0 open(file, "w:UTF-8")=A0 {= |fout| fout.write(data) } if data

ashbb
--90e6ba2121f7e607f604c08cc1a3--