liveBook · Manning

Multibyte string

A multibyte string is a character sequence in which one logical character may occupy multiple bytes according to an encoding, typically terminated by a null character.

How 2 Manning books explain it

Modern C, Third Edition

A multibyte string is a character sequence in which one logical character may occupy multiple bytes according to the active C locale encoding.

How it is used
Uses multibyte strings for extended-character input and output under the active C locale.
How deep it goes
Defines byte sequences and null termination, then works through character counting and restartable conversion; it does not specify a universal multibyte encoding.
Examples
Shows locale-aware terminal output, a conversion-based length function, and an fgets loop scanning buffered input into UTF-8.
What you can do after
Apply it via C library locale and conversion functions to print extended text and scan incomplete multibyte input.

Read how Modern C, Third Edition explains multibyte string →

Modern C

A multibyte string is a null-terminated C string whose character sequences may represent extended characters with multiple bytes.

How it is used
Uses multibyte strings to represent and output extended-character text with ordinary C string-output functions.
How deep it goes
Defines the byte-sequence model and works through locale-dependent output, character counting, and conversion helpers.
Examples
Uses phonetic text, box-drawing separators, and helper implementations for counting and converting characters.
What you can do after
Build it from scratch: output extended-character strings and adapt conversion helpers for counting or copying them.

Read how Modern C explains multibyte string →

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.