The GNU C Library - Extended Characters

Node: Extended Characters Next: Locales Prev: String and Array Utilities Up: Top

Extended Characters

A number of languages use character sets that are larger than the range of values of type char . Japanese and Chinese are probably the most familiar examples.

The GNU C library includes support for two mechanisms for dealing with extended character sets: multibyte characters and wide characters. This chapter describes how to use these mechanisms, and the functions for converting between them.

The behavior of the functions in this chapter is affected by the current locale for character classification---the LC_CTYPE category; see Locale Categories. This choice of locale selects which multibyte code is used, and also controls the meanings and characteristics of wide character codes.

Extended Char Intro Multibyte codes versus wide characters.
Locales and Extended Chars The locale selects the character codes.
Multibyte Char Intro How multibyte codes are represented.
Wide Char Intro How wide characters are represented.
Wide String Conversion Converting wide strings to multibyte code
and vice versa.
Length of Char how many bytes make up one multibyte char.
Converting One Char Converting a string character by character.
Example of Conversion Example showing why converting
one character at a time may be useful.
Shift State Multibyte codes with "shift characters".


Next: Locales Up: Top