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

NAME

6       btowc - convert single byte to wide character
7

SYNOPSIS

9       #include <wchar.h>
10
11       wint_t btowc(int c);
12

DESCRIPTION

14       The btowc() function converts c, interpreted as a multibyte sequence of
15       length 1, starting in the initial shift state, to a wide character  and
16       returns it.  If c is EOF or not a valid multibyte sequence of length 1,
17       the btowc() function returns WEOF.
18

RETURN VALUE

20       The btowc() function returns the wide character converted from the sin‐
21       gle byte c.  If c is EOF or not a valid multibyte sequence of length 1,
22       it returns WEOF.
23

CONFORMING TO

25       C99, POSIX.1-2001.
26

NOTES

28       The behavior of btowc() depends on the LC_CTYPE category of the current
29       locale.
30
31       This  function  should  never  be used.  It does not work for encodings
32       which have state, and unnecessarily  treats  single  bytes  differently
33       from multibyte sequences.  Use either mbtowc(3) or the thread-safe mbr‐
34       towc(3) instead.
35

SEE ALSO

37       mbrtowc(3), mbtowc(3), wctob(3)
38

COLOPHON

40       This page is part of release 3.53 of the Linux  man-pages  project.   A
41       description  of  the project, and information about reporting bugs, can
42       be found at http://www.kernel.org/doc/man-pages/.
43
44
45
46GNU                               2011-09-22                          BTOWC(3)
Impressum