Internationalizing and Localizing Applications in Oracle Solaris

Exit Print View

Updated: July 2014

Character Types and Definitions

The ISO/IEC 9899 standard defines the term "wide character" and the wchar_t and wint_t data types.

  • A wide character is a representation of a single character that fits into an object of type wchar_t.

  • The wchar_t is an integer type capable of representing all characters for all supported locales.

  • The wint_t is an integer type capable of storing any valid value of wchar_t or WEOF.

  • A wide-character string (also wide string or process code string) is a sequence of wide characters terminated by a null wide character code.

Note -  The ISO/IEC 9899 standard does not specify the form or the encoding of the contents for the wchar_t data type. Because it is an implementation-specific data type, it is not portable. Although many implementations use some Unicode encoding forms for the contents of the wchar_t data type, do not assume that the contents of wchar_t are Unicode. Some platforms use UCS-4 or UCS-2 for their wide-character encoding.

In Oracle Solaris, the internal form of wchar_t is specific to a locale. In the Oracle Solaris Unicode locales, wchar_t has the UTF-32 Unicode encoding form, and other locales have different representations.

Fore more information, see stddef.h(3HEAD) and wchar.h (3HEAD) man pages.