logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

char2uni - handling on Unicode, UTF-8 and localized 8 bit encodings libAfterImage/CHAR_SIZE

Name

char2uni - handling on Unicode, UTF-8 and localized 8 bit encodings libAfterImage/CHAR_SIZE

Namechar_Size

       - Convenient macro so we can transparently determine the number of bytes that character spans. It assumes
       UTF-8 encoding when I18N is enabled.

Source

           /* size of the UTF-8 encoded character is based on value of
            * the first byte : */ #define UTF8_CHAR_SIZE(c)   ((((c)&0xC0)==0xC0)? \
                                        (((c)&0x20)? \
                                        (((c)&0x10)? \
                                        (((c)&0x08)? \
                                        (((c)&0x04)?6:5):4):3):2):1)  #ifdef  WIN32 #define UNICODE_CHAR_SIZE(c)
           sizeof(UNICODE_CHAR) #endif #define CHAR_SIZE(c)            1

3rd Berkeley Distribution                      AfterStep v.2.2.12                                   char2uni(3x)

See Also