From the course: Exploring C Libraries
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Working with wide characters - C Tutorial
From the course: Exploring C Libraries
Working with wide characters
- [Instructor] The standard C library comes with the functions necessary to process the assortment of Unicode or wide characters, no extra libraries required. The secret to working with these characters is to set the programs local and use wide character IO functions as demonstrated in this exercise file. The setlocale function at line nine configures the program for output using the specified character set enUS for the United States English language and the UTF 8 character set. The setlocale function is prototyped in the locale H header which is included in line two. When the locale is set the wide character data types and functions prototyped in the wchar H header file, line three, are used. So wchar T is a wide character data type. It's similar to the character data type and it defines a wide string at line seven. See the L prefix, it stipulates that the characters in the string are wide bites not single characters.…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.