1WCTOB(3) Linux Programmer's Manual WCTOB(3)
2
3
4
6 wctob - try to represent a wide character as a single byte
7
9 #include <wchar.h>
10
11 int wctob(wint_t c);
12
14 The wctob() function tests whether the multibyte representation of the
15 wide character c, starting in the initial state, consists of a single
16 byte. If so, it is returned as an unsigned char.
17
18 Never use this function. It cannot help you in writing international‐
19 ized programs. Internationalized programs must never distinguish sin‐
20 gle-byte and multibyte characters.
21
23 The wctob() function returns the single-byte representation of c, if it
24 exists, or EOF otherwise.
25
27 For an explanation of the terms used in this section, see at‐
28 tributes(7).
29
30 ┌──────────┬───────────────┬─────────┐
31 │Interface │ Attribute │ Value │
32 ├──────────┼───────────────┼─────────┤
33 │wctob() │ Thread safety │ MT-Safe │
34 └──────────┴───────────────┴─────────┘
35
37 POSIX.1-2001, POSIX.1-2008, C99.
38
40 The behavior of wctob() depends on the LC_CTYPE category of the current
41 locale.
42
43 This function should never be used. Internationalized programs must
44 never distinguish single-byte and multibyte characters. Use either wc‐
45 tomb(3) or the thread-safe wcrtomb(3) instead.
46
48 btowc(3), wcrtomb(3), wctomb(3)
49
51 This page is part of release 5.10 of the Linux man-pages project. A
52 description of the project, information about reporting bugs, and the
53 latest version of this page, can be found at
54 https://www.kernel.org/doc/man-pages/.
55
56
57
58GNU 2017-09-15 WCTOB(3)