liveBook · Manning

Wide character

A wide character is a value of type wchar_t representing one character from an extended character set.

How 2 Manning books explain it

Modern C

A wide character is a C character representation of type wchar_t intended to encode one character of an extended character set.

How it is used
Uses wide characters to count and process characters represented by multibyte strings.
How deep it goes
Works through conversion and state-aware helper implementations, while deferring broader treatment of wchar_t.
Examples
Shows separator-width calculation, a wide-string duplication helper, and a character-search helper.
What you can do after
Build it from scratch using mbsrtowcs to allocate and fill a wide-character copy of a multibyte string.

Read how Modern C explains wide character →

Modern C, Third Edition

A wide character is a value of type wchar_t that represents exactly one character from an extended character set.

How it is used
Handles individual characters when multibyte strings require parsing, conversion, or character-oriented processing.
How deep it goes
Explains wchar_t, conversion functions, parsing state, locale dependence, and implementation portability checks.
Examples
Uses mbsrtowcs, mbrtowc, locale switching, and Unicode box-drawing character literals.
What you can do after
Apply mbsrtowcs and mbrtowc to convert multibyte input into wchar_t values while tracking parsing state.

Read how Modern C, Third Edition explains wide character →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.