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()
17       function. It reads a wide character from stream and returns it. If  the
18       end of stream is reached, or if ferror(stream) becomes true, it returns
19       WEOF. If a wide character conversion error occurs,  it  sets  errno  to
20       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 non-locking counterparts, see unlocked_stdio(3).
27

RETURN VALUE

29       The  fgetwc() function returns the next wide-character from the stream,
30       or WEOF.
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  behaviour 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() call, it
46       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
52
53
54GNU                               1999-07-25                         FGETWC(3)
Impressum