return pack('C*', unpack('n*', $sTxt));

No. That's not a valid way to convert ucs2 text to anything, let alone
ISO-8859-1

Urge
To
Kill
Rising

[It's converting network order 16 bit values into a list of numbers, then
converting that list to 8 bit characters, with an implicit truncation]

Nicholas Clark

Reply via email to