1GETWCHAR(3) Linux Programmer's Manual GETWCHAR(3)
2
3
4
6 getwchar - read a wide character from standard input
7
9 #include <wchar.h>
10
11 wint_t getwchar(void);
12
14 The getwchar() function is the wide-character equivalent of the
15 getchar(3) function. It reads a wide character from stdin and returns
16 it. If the end of stream is reached, or if ferror(stdin) becomes true,
17 it returns WEOF. If a wide-character conversion error occurs, it sets
18 errno to EILSEQ and returns WEOF.
19
20 For a nonlocking counterpart, see unlocked_stdio(3).
21
23 The getwchar() function returns the next wide-character from standard
24 input, or WEOF.
25
27 For an explanation of the terms used in this section, see
28 attributes(7).
29
30 ┌───────────┬───────────────┬─────────┐
31 │Interface │ Attribute │ Value │
32 ├───────────┼───────────────┼─────────┤
33 │getwchar() │ Thread safety │ MT-Safe │
34 └───────────┴───────────────┴─────────┘
35
37 POSIX.1-2001, POSIX.1-2008, C99.
38
40 The behavior of getwchar() depends on the LC_CTYPE category of the cur‐
41 rent locale.
42
43 It is reasonable to expect that getwchar() will actually read a multi‐
44 byte sequence from standard input and then convert it to a wide charac‐
45 ter.
46
48 fgetwc(3), unlocked_stdio(3)
49
51 This page is part of release 5.04 of the Linux man-pages project. A
52 description of the project, information about reporting bugs, and the
53 latest version of this page, can be found at
54 https://www.kernel.org/doc/man-pages/.
55
56
57
58GNU 2017-09-15 GETWCHAR(3)