perl-unicode

Re: Converting string to UTF-16LE

2004-02-29 16:30:08

At 12:43 am +0200 1/3/04, Jarkko Hietaniemi wrote:

Maybe I'm missing something...?

perl -le 'open(X, ">:encoding(ucs2be)", "ucs2be");print X chr(0x1234);close X'
perl -le 'open(X, "<:encoding(ucs2be)", "ucs2be");printf "%x\n", ord(<X>)'

No.  It was me that was missing it :-)

<Prev in Thread] Current Thread [Next in Thread>