1getwchar(3)                Library Functions Manual                getwchar(3)
2
3
4

NAME

6       getwchar - read a wide character from standard input
7

LIBRARY

9       Standard C library (libc, -lc)
10

SYNOPSIS

12       #include <wchar.h>
13
14       wint_t getwchar(void);
15

DESCRIPTION

17       The  getwchar()  function  is  the  wide-character  equivalent  of  the
18       getchar(3) function.  It reads a wide character from stdin and  returns
19       it.  If the end of stream is reached, or if ferror(stdin) becomes true,
20       it returns WEOF.  If a wide-character conversion error occurs, it  sets
21       errno to EILSEQ and returns WEOF.
22
23       For a nonlocking counterpart, see unlocked_stdio(3).
24

RETURN VALUE

26       The  getwchar()  function returns the next wide-character from standard
27       input, or WEOF.
28

ATTRIBUTES

30       For an  explanation  of  the  terms  used  in  this  section,  see  at‐
31       tributes(7).
32
33       ┌────────────────────────────────────────────┬───────────────┬─────────┐
34Interface                                   Attribute     Value   
35       ├────────────────────────────────────────────┼───────────────┼─────────┤
36getwchar()                                  │ Thread safety │ MT-Safe │
37       └────────────────────────────────────────────┴───────────────┴─────────┘
38

STANDARDS

40       C11, POSIX.1-2008.
41

HISTORY

43       C99, POSIX.1-2001.
44

NOTES

46       The behavior of getwchar() depends on the LC_CTYPE category of the cur‐
47       rent locale.
48
49       It is reasonable to expect that getwchar() will actually read a  multi‐
50       byte sequence from standard input and then convert it to a wide charac‐
51       ter.
52

SEE ALSO

54       fgetwc(3), unlocked_stdio(3)
55
56
57
58Linux man-pages 6.04              2023-03-30                       getwchar(3)
Impressum