patcat88 has asked for the wisdom of the Perl Monks concerning the following question:
UTF-16LE:Unicode character fffe is illegal at C:/perl512/lib/Encode.pm line 174. removing FB_CROAK gave me$s = encode('UTF-16LE', "first name string\0").encode('UTF-16LE', "mi +ddle name string\0"). encode('UTF-16LE', "last name string\0").pack('V', 3654877182).pack('V +', 1).encode('UTF-16LE', "address string\0")."zip code ascii\0".pack( +'V',1); $decodedStr = decode('UTF-16LE', $s, Encode::FB_CROAK); print Dumper([unpack('Z*Z*Z*VVZ*Z*V',$decodedStr)]);
and warning, "Character(s) in 'V' format wrapped in unpack"$VAR1 = [ "first name string", "middle name string", "last name string", "1627454973", "1701995620", "ss string", "\x{697a}\x{2070}\x{6f63}\x{6564}\x{6120}\x{6373}\x{6969}\x{ +100}" ];
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: unpacking mixed ascii & utf16 null termed strings
by ikegami (Patriarch) on Oct 05, 2011 at 00:23 UTC | |
by patcat88 (Deacon) on Oct 05, 2011 at 08:46 UTC | |
|
Re: unpacking mixed ascii & utf16 null termed strings
by Anonymous Monk on Oct 05, 2011 at 00:29 UTC | |
by ikegami (Patriarch) on Oct 05, 2011 at 00:42 UTC |