go ahead... be a heretic | |
PerlMonks |
Re^3: decoding a UTF-16B string found in an email subjectby Anonymous Monk |
on Mar 18, 2014 at 12:53 UTC ( [id://1078776]=note: print w/replies, xml ) | Need Help?? |
According to all docs I've found, a BOM is not necessary, and when a BOM is not present then big-endian is supposed.
However the string you give seems to be little-endian (as is the case in the problem that got me to this page...).
If you s/UTF-16/UTF-16LE/ then your string gets decoded correctly.
In Section
Seekers of Perl Wisdom
|
|