in reply to Re^4: Handling malformed UTF-16 data with PerlIO layer
in thread Handling malformed UTF-16 data with PerlIO layer
and who knows what else there might be
U+FFFE and U+FFFF are invalid.
>perl -e"print qq{\xFE\xFF}" | perl -e"binmode STDIN, ':encoding(UTF-1 +6le)'; <>" UTF-16LE:Unicode character fffe is illegal at -e line 1. >perl -e"print qq{\xFF\xFF}" | perl -e"binmode STDIN, ':encoding(UTF-1 +6le)'; <>" UTF-16LE:Unicode character ffff is illegal at -e line 1.
Same for UCS-2.
There could be more.
|
|---|