Unicode
One of the greatest features that has been added to the C11 standard is support for Unicode through UTF-8, UTF-16, and UTF-32 encodings. C was missing this feature for a long time, and C programmers had to use third-party libraries such as IBM International Components for Unicode (ICU) to fulfill their needs.
Before C11, we only had char
and unsigned char
types, which were 8-bit variables used to store ASCII and Extended ASCII characters. By creating arrays of these ASCII characters, we could create ASCII strings.
Note:
ASCII standard has 128 characters which can be stored in 7 bits. Extended ASCII is an extension to ASCII which adds another 128 characters to make them together 256 characters. Then, an 8-bit or one-byte variable is enough to store all of them. In the upcoming text, we will only use the term ASCII, and by that we refer to both ASCII standard and Extended ASCII.
Note that support for ASCII characters and strings is fundamental...