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
Handles extended-character input and output while retaining compatibility with ordinary string operations.
How deep it goes
Explains termination and byte-count limitations, then develops stateful conversion for incomplete input and buffered output.
Examples
Uses phonetic text, a character-counting helper, and a standard-input scanner that converts multibyte input to UTF-8.
What you can do after
Apply it via C library conversion functions to count converted characters and process 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 handle extended characters in ordinary text input and output.
How deep it goes
Explains string compatibility and locale setup, then works through character counting, wide-character conversion, and character search helpers.
Examples
Demonstrates extended-character line formatting, a conversion-based length helper, and allocation of a wide-character copy.
What you can do after
Apply it via C library functions to output extended text and convert multibyte strings to wide characters.

Read how Modern C explains multibyte string →

What to know first

Related concepts

Questions about multibyte string

What is 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.

Which Manning books explain multibyte string?

Modern C, Third Edition and Modern C.

What should I know before learning multibyte string?

Manning books that teach multibyte string usually introduce reference and wctype.h first.

What is multibyte string a kind of?

Multibyte string is a kind of string. A string is a programming-language value or data type representing an ordered sequence of text characters or encoded units.

What are the parts of multibyte string?

Multibyte string includes multibyte character.

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.