Single-byte characters

A single-byte character can hold code-point values 0 - 255.

A single-byte character can use 7 or 8 bits of a byte to represent a character, as follows:
  • The 7-bit characters make up the ASCII code set.

    These characters contain code points in the range 0 - 127.

  • The 8-bit characters contain code points in the range 128 - 255.

    Only software that is 8-bit clean can correctly interpret 8-bit characters.

English, European, and Middle Eastern code sets support at most 256 characters. Therefore, code sets that support these languages consist of single-byte characters.

When your application processes only single-byte characters, it can perform string-processing tasks based on the assumption that the number of bytes in a buffer equals the number of characters that the buffer can hold. For single-byte code sets, you can rely on the built-in scaling for array allocation and access that the C compiler provides.

The functions and macros that handle multibyte characters are optimized for single-byte characters. Use of single-byte characters with these functions does not involve the full algorithms that multibyte-processing involves.