[EMAIL PROTECTED] wrote:
> $string =~ s/(.)/$1\x00/g;    # expand ANSI to UTF-8 (not the most
> efficient, but...)

This converts ANSI to UTF-16. 'Testing' in UTF-8 is "Testing"; in UTF-16 it
is "T\x00e\x00s\x00t\x00i\x00n\x00g\x00" or
"\x00T\x00e\x00s\x00t\x00i\x00n\x00g" (depending on endianness). The first
128 bytes of UTF-8 are the same as the bytes of ASCII, or as the first 128
bytes of ISO-8859-1 (aka Latin-1).

Cheers,
Philip

---
You are currently subscribed to perl-win32-users as: [archive@jab.org]
To unsubscribe, forward this message to
         [EMAIL PROTECTED]
For non-automated Mailing List support, send email to  
         [EMAIL PROTECTED]

Reply via email to