> File.read("test.txt").force_encoding("UTF-16LE").split("\n")
>
> This script returns an error (Encoding::CompatibilityError) even with
> declaring char code at the beginning or the encoding of the file being
> UTF-16LE.
MacRuby completely ignores the encoding of the file (it always reads
source files as UTF-8).
So you would probably have to do split("\n".encode("UTF-16LE"))
_______________________________________________
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel