Overview
| Artifact ID: | 53d04391aec6ab0927e5c729b0f1365de686bebf |
|---|---|
| Ticket: | 578030ffffffffffffffffffffffffffffffffff
Tcl_UniChar is only 16 bits |
| User & Date: | keithp on 2002-07-10 00:41:27 |
Changes
- icomment:
Logged In: YES user_id=50020 To say that Java and Windows support UCS2 only misstates their capabilities. Both Java and Windows have support for surrogates. That's partially because surrogates are used extensively in supporting Chinese, especially the additions to Unicode 3.2 from the Hong Kong Supplementary Character Set. There is no reason to move the 16-bit APIs to 32-bit values; UCS-2 is a perfectly valid Unicode encoding, it just must allow for the presense of surrogates and respond accordingly. There are a few Tcl APIs which cannot pass surrogate pairs, one of those is the UTF8 to Tcl_UniChar API. The problem is that UTF-8 doesn't use surrogates, and so applications using UTF-8 expect the full range of Unicode values to be encoded without them. Converting from UTF-8 to UCS-2 should automatically insert surrogates while converting back should replace them with the conjoined value. Places in the API which deal with a single codepoint in relation to its UTF-8 encoding should provide an additional 32-bit interface.
- login: "keithp"
- mimetype: "text/plain"
- username: "keithp"