Hi, as known that the default encoding is set to ANSI when creating a
text file. How can I specify the encoding type to UTF-8 other than ANSI
when creating a text file in RUBY? Thanks a lot.
I've tried the ways found by google, but no available. E.g.
tst = File.new("abc.txt","w:UTF-8")
There is an error message: illegal access mode w:UTF-8 (ArgumentError)
Please help me if there is another way to work it out, thanks.
--
Posted via http://www.ruby-forum.com/.