in reply to Re: import UTF-16 strings in XS
in thread import UTF-16 strings in XS
But it's true that that if you mistakenly feed random (non-UTF-16) data into this sort of conversion, the result might be worse than just "garbage out".
There are a fair number of "gaps" in the 16-bit space, where Unicode doesn't really have anything defined, as well as some spots that are specifically defined as "not usable characters". And heaven forbid the input data should contain anything in the UTF-16 "Surrogate" range (0xD800-0xDFFF), which is reserved for building "wider" characters using two consecutive 16-bit values (these get rendered into 4-byte utf8 codes, whereas all other UTF-16 code points end up as 1, 2 or 3 bytes in utf8).
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: import UTF-16 strings in XS (Win32)
by tye (Sage) on Sep 13, 2006 at 06:58 UTC |