String encodings

Native C API

On Microsoft Windows, string functions have an ANSI (8-bit) variant without a suffix and a wide-character Unicode variant with a trailing W.

On Unix builds, the functions without a suffix use UTF-8 strings; W variants are not available. Function names with a trailing T select the appropriate variant:

  • Microsoft Windows without _UNICODE defined: ANSI variant without a suffix.

  • Microsoft Windows with _UNICODE defined: Unicode W variant.

  • Unix builds: UTF-8 variant without a suffix; leave _UNICODE undefined.

Use the T names for portable calls. Do not #define _UNICODE on Unix builds.

T names are preprocessor aliases, not additional runtime functions. There are no separate A-suffixed variants in this public header.

Examples

Search documentation

Search in
More scopes
Additional scopes

All contents