Step Into Labs

Step Into C · Lesson 22 · Windows C

Strings & Unicode

char vs wchar_t, A vs W functions, UTF-8 and UTF-16, and the type names you will see everywhere.

Part of Step Into C. The full lesson, its missions and the real compiler and debugger are in the course. Try a free lesson first to see how it works.

Inside Windows, every string is UTF-16: an array of 16-bit code units, written wchar_t in C. A wide string literal has an L prefix:

In this lesson

Missions

  1. Two bytes per unit
  2. UTF-8 to UTF-16
  3. And back to UTF-8
  4. A and W