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

Working with wide characters - C Tutorial

From the course: Exploring C Libraries

Start my 1-month free trial

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.…

Contents