Next: , Previous: char * strings, Up: Introduction


1.6 The wchar_t mess

The ISO C and POSIX standard creators made an attempt to fix the first problem mentioned in the previous section. They introduced

Unfortunately, this API and its implementation has numerous problems:

As a consequence, it is better to use multibyte strings, as explained in the previous section. Such multibyte strings can bypass limitations of the wchar_t type, if you use functions defined in gnulib and libunistring for text processing. They can also faithfully transport malformed characters that were present in the input, without requiring the program to produce garbage or abort.