Go to main content

man pages section 3: Library Interfaces and Headers

Exit Print View

Updated: Thursday, June 13, 2019
 
 

wchar.h(3HEAD)

Name

wchar.h, wchar - wide-character handling

Synopsis

#include <wchar.h>

Description

The <wchar.h> header defines the following types:

wchar_t

As described in <stddef.h>.

wint_t

An integer type capable of storing any valid value of wchar_t or WEOF.

wctype_t

A scalar type of a data object that can hold values which represent locale-specific character classification.

mbstate_t

An object type other than an array type that can hold the conversion state information necessary to convert between sequences of (possibly multi-byte) characters and wide characters. If a codeset is being used such that an mbstate_t needs to preserve more than two levels of reserved state, the results are unspecified.

FILE

As described in <stdio.h>.

size_t

As described in <stddef.h>.

va_list

As described in <stdarg.h>.

locale_t

As described in <locale.h>.

The implementation supports one or more programming environments in which the width of wint_t is no greater than the width of type long. The names of these programming environments can be obtained using the confstr(3C) function or the getconf(1) utility.

The <wchar.h> header defines the following macros:

WCHAR_MAX

The maximum value representable by an object of type wchar_t.

WCHAR_MIN

The minimum value representable by an object of type wchar_t.

WEOF

Constant expression of type wint_t that is returned by several WP functions to indicate end-of-file.

NULL

As described in <stddef.h>.

The tag tm is declared as naming an incomplete structure type, the contents of which are described in the header <time.h>.

Inclusion of the <wchar.h> header can make visible all symbols from the headers <ctype.h>, <string.h>, <stdarg.h>, < stddef.h>, <stdio.h>, <stdlib.h>, and <time.h>.

Attributes

See attributes(7) for descriptions of the following attributes:

ATTRIBUTE TYPE
ATTRIBUTE VALUE
Interface Stability
Committed
Standard

See Also

getconf(1), btowc(3C), confstr(3C), fgetwc(3C), fputwc(3C), fputws(3C), fwide(3C), fwprintf(3C), fwscanf(3C), getwc(3C), getwchar(3C), getws(3C), iswalpha(3C), iswctype(3C), mbrlen(3C), mbrtowc(3C), mbsinit(3C), mbsrtowcs(3C), towlower(3C), towupper(3C), ungetwc(3C), vfwprintf(3C), wcrtomb(3C), wcscoll(3C), wcsftime(3C), wcsrtombs(3C), wcsstr(3C), wcstod(3C), wcstol(3C), wcstoul(3C), wcstring(3C), wcswidth(3C), wcsxfrm(3C), wctob(3C), wctype(3C), wcwidth(3C), wmemchr(3C), wmemcmp(3C), wmemcpy(3C), wmemmove(3C), wmemset(3C), stdarg(3EXT), locale.h(3HEAD), stddef.h(3HEAD), stdio.h(3HEAD), stdlib.h(3HEAD), string.h(3HEAD), time.h(3HEAD), wctype.h(3HEAD), attributes(7), standards(7)