in reply to Re^5: Handling malformed UTF-16 data with PerlIO layer
in thread Handling malformed UTF-16 data with PerlIO layer
Regarding ikegami's observation about FFFE and FFFF, I noticed that this is a difference between 5.8.8 and 5.10.0 -- Encode handles these code points in 5.8 but it spits out the error in 5.10.
The error messages I got were from 5.8.8. I don't see any different between 5.8 and 5.10.
>c:\progs\perl580\bin\perl -e"print qq{\xFE\xFF}" | perl -e"binmode ST +DIN, ':encoding(UTF-16le)'; <>" UTF-16LE:Unicode character fffe is illegal at -e line 1. >c:\progs\perl588\bin\perl -e"print qq{\xFE\xFF}" | perl -e"binmode ST +DIN, ':encoding(UTF-16le)'; <>" UTF-16LE:Unicode character fffe is illegal at -e line 1. >c:\progs\perl5100\bin\perl -e"print qq{\xFE\xFF}" | perl -e"binmode S +TDIN, ':encoding(UTF-16le)'; <>" UTF-16LE:Unicode character fffe is illegal at -e line 1.
|
|---|