NAME
fgetwc, getwc - read a wide character from a FILE stream
SYNOPSIS
#include <stdio.h> #include <wchar.h> wint_t fgetwc(FILE *stream); wint_t getwc(FILE *stream);
DESCRIPTION
The fgetwc() function is the wide-character equivalent of the fgetc(3) function. It reads a wide character from stream and returns it. If the end of stream is reached, or if ferror(stream) becomes true, it returns WEOF. If a wide-character conversion error occurs, it sets errno to EILSEQ and returns WEOF. The getwc() function or macro functions identically to fgetwc(). It may be implemented as a macro, and may evaluate its argument more than once. There is no reason ever to use it. For nonlocking counterparts, see unlocked_stdio(3).
RETURN VALUE
The fgetwc() function returns the next wide-character from the stream, or WEOF. In the event of an error, errno is set to indicate the cause.
ERRORS
Apart from the usual ones, there is EILSEQ The data obtained from the input stream does not form a valid character.
ATTRIBUTES
For an explanation of the terms used in this section, see attributes(7). Interface Attribute Value fgetwc(), getwc() Thread safety MT-Safe
CONFORMING TO
POSIX.1-2001, POSIX.1-2008, C99.
NOTES
The behavior of fgetwc() depends on the LC_CTYPE category of the current locale. In the absence of additional information passed to the fopen(3) call, it is reasonable to expect that fgetwc() will actually read a multibyte sequence from the stream and then convert it to a wide character.
SEE ALSO
fgetws(3), fputwc(3), ungetwc(3), unlocked_stdio(3)
COLOPHON
This page is part of release 4.09 of the Linux man-pages project. A description of the project, information about reporting bugs, and the latest version of this page, can be found at https://www.kernel.org/doc/man-pages/.
More Linux Commands
manpages/wall.1.html
wall(1) - write a message to users - Linux manual page......
wall displays a message, or the contents of a file, or otherwise its standard input, on the terminals of all currently logged in users. The command will wrap li
manpages/chacl.1.html
chacl(1) - change the access control list of a file or direc
chacl is an IRIX-compatibility command, and is maintained for those users who are familiar with its use from either XFS or IRIX. Refer to the SEE ALSO section b
manpages/mq_send.3.html
mq_send(3) - send a message to a message queue (Man Page)...
mq_send() adds the message pointed to by msg_ptr to the message queue referred to by the descriptor mqdes. The msg_len argument specifies the length of the mess
manpages/perl561delta.1.html
perl561delta(1) - what's new for perl v5.6.x (Man Page).....
This document describes differences between the 5.005 release and the 5.6.1 release. Summary of changes between 5.6.0 and 5.6.1 This section contains a summary
manpages/XkbKeyGroupInfo.3.html
XkbKeyGroupInfo(3) - Returns the number of groups of symbols
The group_info field of an XkbSymMapRec is an encoded value containing the number of groups of symbols bound to the key as well as the specification of the trea
manpages/pam_verror.3.html
pam_verror(3) - display error messages to the user (ManPage)
The pam_error function prints error messages through the conversation function to the user. The pam_verror function performs the same task as pam_error() with t
manpages/ntfsfix.8.html
ntfsfix(8) - fix common errors and force Windows to check NT
ntfsfix is a utility that fixes some common NTFS problems. ntfsfix is NOT a Linux version of chkdsk. It only repairs some fundamental NTFS inconsistencies, rese
manpages/systemd-activate.8.html
systemd-activate(8) Test socket activation of daemons.......
systemd-activate can be used to launch a socket activated daemon from the command-line for testing purposes. It can also be used to launch single instances of t
manpages/gnutls_certificate_set_x509_trust_file.3.html
gnutls_certificate_set_x509_trust_file(3) - API function....
gnutls_certificate_set_x509_trust_file.3 - This function adds the trusted CAs in order to verify client or server certificates. In case of a client this is not
manpages/perl584delta.1.html
perl584delta(1) - what is new for perl v5.8.4 (Man Page)....
This document describes differences between the 5.8.3 release and the 5.8.4 release. Incompatible Changes Many minor bugs have been fixed. Scripts which happen
manpages/mzip.1.html
mzip(1) - change protection mode and eject disk on Zip/Jaz d
The mzip command is used to issue ZIP disk specific commands on Linux, Solaris or HP-UX. Its syntax is: mzip [-epqrwx] Mzip allows the following command line op
manpages/fcntl64.2.html
fcntl64(2) - manipulate file descriptor - Linux manual page
fcntl() performs one of the operations described below on the open file descriptor fd. The operation is determined by cmd. fcntl() can take an optional third ar
