string need to be robust

ZY Zhou rinick at GeeeeMail.com
Sun Mar 13 08:43:29 PDT 2011


If a invalid utf8 or utf16 code need to be converted to utf32, then it should be
converted to an invalid utf32. that's why D800~DFFF are marked as invalid points
in unicode standard.

== Quote from spir (denis.spir at gmail.com)'s article
> This is not a good idea, imo. Surrogate values /are/ invalid code points. (For
> the ones who guess, there are a range of /code unit/ values used to code in
> utf16 code points > 0xFFFF.) They should never appear in a string of dchar[];
> and a string of char[] code units should never encode a non-code point in the




More information about the Digitalmars-d mailing list