clang API Documentation
#include "clang/Basic/ConvertUTF.h"
Go to the source code of this file.
Defines | |
| #define | UNI_SUR_HIGH_START (UTF32)0xD800 |
| #define | UNI_SUR_HIGH_END (UTF32)0xDBFF |
| #define | UNI_SUR_LOW_START (UTF32)0xDC00 |
| #define | UNI_SUR_LOW_END (UTF32)0xDFFF |
| #define | false 0 |
| #define | true 1 |
Functions | |
| static Boolean | isLegalUTF8 (const UTF8 *source, int length) |
| Boolean | isLegalUTF8Sequence (const UTF8 *source, const UTF8 *sourceEnd) |
| ConversionResult | ConvertUTF8toUTF16 (const UTF8 **sourceStart, const UTF8 *sourceEnd, UTF16 **targetStart, UTF16 *targetEnd, ConversionFlags flags) |
| ConversionResult | ConvertUTF8toUTF32 (const UTF8 **sourceStart, const UTF8 *sourceEnd, UTF32 **targetStart, UTF32 *targetEnd, ConversionFlags flags) |
Variables | |
| static const int | halfShift = 10 |
| static const UTF32 | halfBase = 0x0010000UL |
| static const UTF32 | halfMask = 0x3FFUL |
| static const char | trailingBytesForUTF8 [256] |
| static const UTF32 | offsetsFromUTF8 [6] |
| static const UTF8 | firstByteMark [7] = { 0x00, 0x00, 0xC0, 0xE0, 0xF0, 0xF8, 0xFC } |
| #define false 0 |
Definition at line 64 of file ConvertUTF.c.
| #define true 1 |
Definition at line 65 of file ConvertUTF.c.
| #define UNI_SUR_HIGH_END (UTF32)0xDBFF |
Definition at line 61 of file ConvertUTF.c.
| #define UNI_SUR_HIGH_START (UTF32)0xD800 |
Definition at line 60 of file ConvertUTF.c.
Referenced by ConvertUTF8toUTF16(), and ConvertUTF8toUTF32().
| #define UNI_SUR_LOW_END (UTF32)0xDFFF |
Definition at line 63 of file ConvertUTF.c.
Referenced by ConvertUTF8toUTF16(), and ConvertUTF8toUTF32().
| #define UNI_SUR_LOW_START (UTF32)0xDC00 |
Definition at line 62 of file ConvertUTF.c.
Referenced by ConvertUTF8toUTF16().
| ConversionResult ConvertUTF8toUTF16 | ( | const UTF8 ** | sourceStart, |
| const UTF8 * | sourceEnd, | ||
| UTF16 ** | targetStart, | ||
| UTF16 * | targetEnd, | ||
| ConversionFlags | flags | ||
| ) |
Definition at line 398 of file ConvertUTF.c.
References conversionOK, halfBase, halfMask, halfShift, isLegalUTF8(), offsetsFromUTF8, sourceExhausted, sourceIllegal, strictConversion, targetExhausted, trailingBytesForUTF8, UNI_MAX_BMP, UNI_MAX_UTF16, UNI_REPLACEMENT_CHAR, UNI_SUR_HIGH_START, UNI_SUR_LOW_END, and UNI_SUR_LOW_START.
Referenced by GetConstantCFStringEntry().
| ConversionResult ConvertUTF8toUTF32 | ( | const UTF8 ** | sourceStart, |
| const UTF8 * | sourceEnd, | ||
| UTF32 ** | targetStart, | ||
| UTF32 * | targetEnd, | ||
| ConversionFlags | flags | ||
| ) |
Definition at line 471 of file ConvertUTF.c.
References conversionOK, isLegalUTF8(), offsetsFromUTF8, sourceExhausted, sourceIllegal, strictConversion, targetExhausted, trailingBytesForUTF8, UNI_MAX_LEGAL_UTF32, UNI_REPLACEMENT_CHAR, UNI_SUR_HIGH_START, and UNI_SUR_LOW_END.
Referenced by clang::CharLiteralParser::CharLiteralParser().
Definition at line 357 of file ConvertUTF.c.
Referenced by ConvertUTF8toUTF16(), ConvertUTF8toUTF32(), and isLegalUTF8Sequence().
Definition at line 388 of file ConvertUTF.c.
References isLegalUTF8(), and trailingBytesForUTF8.
const UTF8 firstByteMark[7] = { 0x00, 0x00, 0xC0, 0xE0, 0xF0, 0xF8, 0xFC } [static] |
Definition at line 102 of file ConvertUTF.c.
Referenced by EncodeUCNEscape().
Definition at line 57 of file ConvertUTF.c.
Referenced by ConvertUTF8toUTF16().
Definition at line 58 of file ConvertUTF.c.
Referenced by ConvertUTF8toUTF16().
const int halfShift = 10 [static] |
Definition at line 55 of file ConvertUTF.c.
Referenced by ConvertUTF8toUTF16().
const UTF32 offsetsFromUTF8[6] [static] |
{ 0x00000000UL, 0x00003080UL, 0x000E2080UL,
0x03C82080UL, 0xFA082080UL, 0x82082080UL }
Definition at line 92 of file ConvertUTF.c.
Referenced by ConvertUTF8toUTF16(), and ConvertUTF8toUTF32().
const char trailingBytesForUTF8[256] [static] |
{
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, 3,3,3,3,3,3,3,3,4,4,4,4,5,5,5,5
}
Definition at line 76 of file ConvertUTF.c.
Referenced by ConvertUTF8toUTF16(), ConvertUTF8toUTF32(), and isLegalUTF8Sequence().