Thanks...so if I upgraded to Ruby 1.9, would it convert it
automatically?
You'd have to tell it that you want to work with UTF-8
internally by putting this at the top of your application:
Encoding.default_internal = Encoding::UTF_8
and then tell the read or open function that the file
is UTF-16 encoded, e.g.:
content = File.read("logfile.log", encoding: "utf-16")
Though I don't know how many gems already work for
Ruby 1.9.1 on Windows.
Stefan
ยทยทยท
2009/2/2 Jim Knowlton <jknowlton525@gmail.com>:
Thanks...so if I upgraded to Ruby 1.9, would it convert it
automatically?