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

ATTRIBUTES

25       For  an  explanation  of  the  terms  used   in   this   section,   see
26       attributes(7).
27
28       ┌──────────┬───────────────┬─────────┐
29Interface Attribute     Value   
30       ├──────────┼───────────────┼─────────┤
31btowc()   │ Thread safety │ MT-Safe │
32       └──────────┴───────────────┴─────────┘

CONFORMING TO

34       POSIX.1-2001, POSIX.1-2008, C99.
35

NOTES

37       The behavior of btowc() depends on the LC_CTYPE category of the current
38       locale.
39
40       This function should never be used.  It does  not  work  for  encodings
41       which  have  state,  and  unnecessarily treats single bytes differently
42       from multibyte sequences.  Use either mbtowc(3) or the thread-safe mbr‐
43       towc(3) instead.
44

SEE ALSO

46       mbrtowc(3), mbtowc(3), wctob(3)
47

COLOPHON

49       This  page  is  part of release 4.15 of the Linux man-pages project.  A
50       description of the project, information about reporting bugs,  and  the
51       latest     version     of     this    page,    can    be    found    at
52       https://www.kernel.org/doc/man-pages/.
53
54
55
56GNU                               2015-08-08                          BTOWC(3)
Impressum