icu4c api proposal: add U_IS_SUPPLEMENTARY(c) and U_IS_BMP(c)
Markus Scherer <[email protected]>
| Newsgroups | gmane.comp.lib.icu.general |
|---|---|
| Organization | IBM |
| Message-ID | <[email protected]> |
Jitterbug 2913 says it all, quote: Some users are confused between surrogates and supplementary code points. There is a macro U_IS_SURROGATE(c), but users indicate that it would help avoid some confusion if there were macros U_IS_SUPPLEMENTARY(c) and U_IS_BMP(c) as well. In short, a surrogate is a pseudo-character with a value D800..DFFF, and a matched pair of two surrogates in UTF-16 encodes a supplemenary code point, which in turn has a code point value of 10000..10FFFF. add to utf.h: #define U_IS_SUPPLEMENTARY(c) ((c)>0xffff) #define U_IS_BMP(c) ((uint32_t)(c)<=0xffff) Expiration: Friday, 2003-nov-07 Sincerely, markus