char2uni(3x)

char2uni3x

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

Releases

11 releases since Debian 3.1 (Sarge); the text changed 10 times.

  1. 3.1
  2. 4.0
  3. 5.0
  4. 6.0
  5. 7
  6. 8
  7. 9
  8. 10
  9. 11
  10. 12
  11. 13

From libafterimage-dev 2.2.12-18 in Debian 13 (Trixie). Parsed by carta from the page's man source.