in reply to Reading UTF-16LE file into an array
A "low-tech" alternative would be:
which should even work in Perl 5.6, though I wouldn't do much with UTF-encoded text in Perl 5.6 (I don't even completely trust 5.8 for that yet). - tyemy $filename = "utf16le.txt"; open IN, "< utf16le.txt" or die "Can't read $filename: $!\n"; local( $\ )= \2048; my $utf8str= ""; while( <IN> ) { $utf8str .= pack "U*", unpack "v*", $_; }
|
|---|