in reply to Unicode UTF16 - Unknown encoding error
'Unknown encoding 'UTF16' at sample.pl...'.
You want "UTF-16" or "UTF-16LE". See Encode::Unicode. Also, Encode has from_to, so I'd probably write
use Encode qw(from_to); open (FSIN, "$_")||die ("Unable to open SGML.3d file $_"); my $sfile = <FSIN>; from_to($sfile,'UTF-16LE','ascii'); # or latin1, iso-8859-1 ...
--shmem
_($_=" "x(1<<5)."?\n".q·/)Oo. G°\ /
/\_¯/(q /
---------------------------- \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Unicode UTF16 - Unknown encoding error
by Anonymous Monk on Jun 25, 2007 at 11:50 UTC | |
by shmem (Chancellor) on Jun 25, 2007 at 16:18 UTC | |
by Anonymous Monk on Jun 26, 2007 at 04:35 UTC | |
by zentara (Cardinal) on Jun 25, 2007 at 12:43 UTC |