multi-byte character
A character that takes more than one byte in its encoding, such as é (two bytes in UTF-8) or most emoji (four bytes).
In more detail
When data arrives in chunks, a chunk boundary can fall inside one of these characters. Decoding each chunk separately then produces replacement characters, which StringDecoder avoids.
Related terms
- UTF-8 — The most widely used character encoding, which can represent every Unicode character and matches ASCII for plain English letters.
- StringDecoder — A Node.js class that turns a series of Buffer chunks into text without breaking characters that are split across chunk boundaries.
- replacement character — The symbol �, which decoders show in place of bytes that do not form a valid character.
Taught in
- Buffer Encodings: UTF-8, Hex, Base64 & Slicing — Node.js Internals & Backend Services