%PAGEREF%(MinGW)

NAME
btowc - convert a single byte to a wide character

SYNOPSIS
#include <stdio.h>
#include <wchar.h>

wint_t btowc( int c );

DESCRIPTION
If c is not EOF, the btowc() function attempts to interpret c as a multibyte character sequence of length one; if the single byte evaluated represents a complete multibyte character, in the codeset which is associated with the LC_CTYPE category of the active process locale, btowc() converts it to, and returns, its equivalent wide character value.

RETURN VALUE
If c is EOF, or if it does not represent a complete multibyte character sequence of length one, btowc() returns WEOF; otherwise the conversion of the single byte character, to its equivalent wide character value, is returned.

ERROR CONDITIONS
No error conditions are defined.

STANDARDS CONFORMANCE
Except to the extent that it may be affected by limitations of the underlying MS-Windows API, the libmingwex implementation of btowc() conforms generally to ISO-C99, POSIX.1-2001, and POSIX.1-2008.

CAVEATS AND BUGS
Use of the btowc() function is discouraged; it serves no purpose which may not be better served by the mbrtowc(3) function, which should be considered as a preferred alternative.

SEE ALSO
mbrtowc(3)

AUTHOR
This manpage was written by Keith Marshall, <keith@users.osdn.me>, to document the btowc() function as it has been implemented for the MinGW.org Project. It may be copied, modified and redistributed, without restriction of copyright, provided this acknowledgement of contribution by the original author remains in place.