From: Doug Ewell (dewell@adelphia.net)
Date: Fri Mar 10 2006 - 23:53:51 CST
Kornkreismuster <Kornkreismuster at web dot de> wrote:
> I've got a problem to understand how it is possible to encode
> Hex10FFFF characters with UTF-16. If I try to calculate the range of
> UTF-16 I always get a maximum number of Hex10F7FF.
>
> Calculation:
>
> (DBFF - D7FF) * (DFFF - DBFF) + D7FF + FFFF - DFFF
> (High Surr.) (Low Surr.) (0 to D7FF) (D800 to FFFF)
>
> Please tell me how to encode Hex10FFFF characters.
Your formula is right, and so is Ken. There are 1024 x 1024 = 1048576
code points accessible by surrogates, plus another 65536 in the BMP, but
you have to subtract the 2048 surrogate code points. These are
permanently reserved because of their use in UTF-16.
-- Doug Ewell Fullerton, California, USA http://users.adelphia.net/~dewell/
This archive was generated by hypermail 2.1.5 : Fri Mar 10 2006 - 23:55:54 CST