Home | History | Annotate | Download | only in common

Lines Matching refs:UTF32

41 Conversions between UTF32, UTF-16, and UTF-8. Source code file.
65 static const UTF32 halfBase = 0x0010000UL;
66 static const UTF32 halfMask = 0x3FFUL;
68 #define UNI_SUR_HIGH_START (UTF32)0xD800
69 #define UNI_SUR_HIGH_END (UTF32)0xDBFF
70 #define UNI_SUR_LOW_START (UTF32)0xDC00
71 #define UNI_SUR_LOW_END (UTF32)0xDFFF
82 ConversionResult ConvertUTF32toUTF16 (const UTF32** sourceStart, const UTF32* sourceEnd,
85 const UTF32* source = *sourceStart;
88 UTF32 ch;
131 UTF32** targetStart, UTF32* targetEnd, ConversionFlags flags) {
134 UTF32* target = *targetStart;
135 UTF32 ch, ch2;
139 /* If we have a surrogate pair, convert to UTF32 first. */
144 /* If it's a low surrogate, convert to UTF32. */
209 static const UTF32 offsetsFromUTF8[6] = { 0x00000000UL, 0x00003080UL, 0x000E2080UL,
239 UTF32 ch;
241 const UTF32 byteMask = 0xBF;
242 const UTF32 byteMark = 0x80;
245 /* If we have a surrogate pair, convert to UTF32 first. */
249 UTF32 ch2 = *source;
250 /* If it's a low surrogate, convert to UTF32. */
274 if (ch < (UTF32)0x80) { bytesToWrite = 1;
275 } else if (ch < (UTF32)0x800) { bytesToWrite = 2;
276 } else if (ch < (UTF32)0x10000) { bytesToWrite = 3;
277 } else if (ch < (UTF32)0x110000) { bytesToWrite = 4;
360 UTF32 ch = 0;
426 ConversionResult ConvertUTF32toUTF8 (const UTF32** sourceStart, const UTF32* sourceEnd,
429 const UTF32* source = *sourceStart;
432 UTF32 ch;
434 const UTF32 byteMask = 0xBF;
435 const UTF32 byteMark = 0x80;
447 * illegally large UTF32 things (> Plane 17) into replacement chars.
449 if (ch < (UTF32)0x80) { bytesToWrite = 1;
450 } else if (ch < (UTF32)0x800) { bytesToWrite = 2;
451 } else if (ch < (UTF32)0x10000) { bytesToWrite = 3;
479 UTF32** targetStart, UTF32* targetEnd, ConversionFlags flags) {
482 UTF32* target = *targetStart;
484 UTF32 ch = 0;