1FGETWC(3)                  Linux Programmer's Manual                 FGETWC(3)
2
3
4

NAME

6       fgetwc, getwc - read a wide character from a FILE stream
7

SYNOPSIS

9       #include <stdio.h>
10       #include <wchar.h>
11
12       wint_t fgetwc(FILE *stream);
13       wint_t getwc(FILE *stream);
14

DESCRIPTION

16       The  fgetwc() function is the wide-character equivalent of the fgetc(3)
17       function.  It reads a wide character from stream and  returns  it.   If
18       the  end  of  stream  is reached, or if ferror(stream) becomes true, it
19       returns WEOF.  If a wide-character conversion  error  occurs,  it  sets
20       errno to EILSEQ and returns WEOF.
21
22       The  getwc()  function  or macro functions identically to fgetwc().  It
23       may be implemented as a macro, and may evaluate its argument more  than
24       once.  There is no reason ever to use it.
25
26       For nonlocking counterparts, see unlocked_stdio(3).
27

RETURN VALUE

29       The  fgetwc() function returns the next wide-character from the stream,
30       or WEOF.  In the event of an error, errno is set to indicate the cause.
31

ERRORS

33       Apart from the usual ones, there is
34
35       EILSEQ The data obtained from the input stream does not  form  a  valid
36              character.
37

CONFORMING TO

39       C99, POSIX.1-2001.
40

NOTES

42       The  behavior  of fgetwc() depends on the LC_CTYPE category of the cur‐
43       rent locale.
44
45       In the absence of additional information passed to the  fopen(3)  call,
46       it is reasonable to expect that fgetwc() will actually read a multibyte
47       sequence from the stream and then convert it to a wide character.
48

SEE ALSO

50       fgetws(3), fputwc(3), ungetwc(3), unlocked_stdio(3)
51

COLOPHON

53       This page is part of release 3.53 of the Linux  man-pages  project.   A
54       description  of  the project, and information about reporting bugs, can
55       be found at http://www.kernel.org/doc/man-pages/.
56
57
58
59GNU                               2013-04-19                         FGETWC(3)
Impressum