00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00116 #ifndef __UTF_H__
00117 #define __UTF_H__
00118
00119 #include "unicode/umachine.h"
00120
00121
00122
00123
00130 #define U_IS_UNICODE_NONCHAR(c) \
00131 ((c)>=0xfdd0 && \
00132 ((c)<=0xfdef || ((c)&0xfffe)==0xfffe) && (c)<=0x10ffff)
00133
00151 #define U_IS_UNICODE_CHAR(c) \
00152 ((uint32_t)(c)<0xd800 || \
00153 (0xdfff<(c) && (c)<=0x10ffff && !U_IS_UNICODE_NONCHAR(c)))
00154
00161 #define U_IS_BMP(c) ((uint32_t)(c)<=0xffff)
00162
00169 #define U_IS_SUPPLEMENTARY(c) ((uint32_t)((c)-0x10000)<=0xfffff)
00170
00177 #define U_IS_LEAD(c) (((c)&0xfffffc00)==0xd800)
00178
00185 #define U_IS_TRAIL(c) (((c)&0xfffffc00)==0xdc00)
00186
00193 #define U_IS_SURROGATE(c) (((c)&0xfffff800)==0xd800)
00194
00202 #define U_IS_SURROGATE_LEAD(c) (((c)&0x400)==0)
00203
00211 #define U_IS_SURROGATE_TRAIL(c) (((c)&0x400)!=0)
00212
00213
00214
00215 #if !U_NO_DEFAULT_INCLUDE_UTF_HEADERS
00216
00217 #include "unicode/utf8.h"
00218 #include "unicode/utf16.h"
00219
00220
00221 #include "unicode/utf_old.h"
00222
00223 #endif
00224
00225 #endif