1char2uni(1) AfterStep X11 window manager char2uni(1)
2
3
4
6 char2uni - handling on Unicode, UTF-8 and localized 8 bit encodings
7 libAfterImage/CHAR_SIZE
8
10 - Convinient macro so we can transparently determine the number of
11 bytes that character spans. It assumes UTF-8 encoding when I18N is
12 enabled.
13
14
16 Source :
17 /* size of the UTF-8 encoded character is based on value of
18 * the first byte : */
19 #define UTF8_CHAR_SIZE(c) ((((c)&0xC0)==0xC0)? (((c)&0x20)? (((c)&0x10)? (((c)&0x08)? (((c)&0x04)?6:5):4):3):2):1)
20 #ifdef WIN32
21 #define UNICODE_CHAR_SIZE(c) sizeof(UNICODE_CHAR)
22 #endif
23 #define CHAR_SIZE(c) 1
24
25
26
273rd Berkeley Distribution AfterStep v.2.2.6 char2uni(1)