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.
- ~35 minreading and coding
- 4missions
- membersaccess
- Win32real Windows API
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
- Windows speaks UTF-16
- A and W functions
- Reading the type names
- Converting
Missions
- Two bytes per unit
- UTF-8 to UTF-16
- And back to UTF-8
- A and W