]>
Commit | Line | Data |
---|---|---|
fea681da MK |
1 | .\" Copyright (c) Bruno Haible <haible@clisp.cons.org> |
2 | .\" | |
89e3ffe9 | 3 | .\" %%%LICENSE_START(GPLv2+_DOC_ONEPARA) |
fea681da MK |
4 | .\" This is free documentation; you can redistribute it and/or |
5 | .\" modify it under the terms of the GNU General Public License as | |
6 | .\" published by the Free Software Foundation; either version 2 of | |
7 | .\" the License, or (at your option) any later version. | |
fe382ebf | 8 | .\" %%%LICENSE_END |
fea681da MK |
9 | .\" |
10 | .\" References consulted: | |
11 | .\" GNU glibc-2 source code and manual | |
12 | .\" Dinkumware C library reference http://www.dinkumware.com/ | |
008f1ecc | 13 | .\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html |
fea681da MK |
14 | .\" ISO/IEC 9899:1999 |
15 | .\" | |
4b8c67d9 | 16 | .TH WCTOB 3 2017-09-15 "GNU" "Linux Programmer's Manual" |
fea681da MK |
17 | .SH NAME |
18 | wctob \- try to represent a wide character as a single byte | |
19 | .SH SYNOPSIS | |
20 | .nf | |
21 | .B #include <wchar.h> | |
68e4db0a | 22 | .PP |
fea681da MK |
23 | .BI "int wctob(wint_t " c ); |
24 | .fi | |
25 | .SH DESCRIPTION | |
60a90ecd MK |
26 | The |
27 | .BR wctob () | |
28 | function tests whether | |
ae03dc66 | 29 | the multibyte representation of the |
e4a0d6cb MK |
30 | wide character |
31 | .IR c , | |
32 | starting in the initial state, consists of a single | |
c13182ef | 33 | byte. |
d9a10d9d MK |
34 | If so, it is returned as an |
35 | .IR "unsigned char" . | |
fea681da | 36 | .PP |
c13182ef MK |
37 | Never use this function. |
38 | It cannot help you in writing internationalized | |
39 | programs. | |
40 | Internationalized programs must never distinguish single-byte and | |
ae03dc66 | 41 | multibyte characters. |
47297adb | 42 | .SH RETURN VALUE |
60a90ecd MK |
43 | The |
44 | .BR wctob () | |
e4a0d6cb MK |
45 | function returns the single-byte representation of |
46 | .IR c , | |
47 | if it exists, of | |
48 | .B EOF | |
49 | otherwise. | |
988517af MS |
50 | .SH ATTRIBUTES |
51 | For an explanation of the terms used in this section, see | |
52 | .BR attributes (7). | |
53 | .TS | |
54 | allbox; | |
55 | lb lb lb | |
56 | l l l. | |
57 | Interface Attribute Value | |
58 | T{ | |
59 | .BR wctob () | |
60 | T} Thread safety MT-Safe | |
61 | .TE | |
847e0d88 | 62 | .sp 1 |
47297adb | 63 | .SH CONFORMING TO |
563a5c3f | 64 | POSIX.1-2001, POSIX.1-2008, C99. |
fea681da | 65 | .SH NOTES |
d9bfdb9c | 66 | The behavior of |
60a90ecd | 67 | .BR wctob () |
1274071a MK |
68 | depends on the |
69 | .B LC_CTYPE | |
70 | category of the | |
fea681da MK |
71 | current locale. |
72 | .PP | |
c13182ef MK |
73 | This function should never be used. |
74 | Internationalized programs must never | |
ae03dc66 | 75 | distinguish single-byte and multibyte characters. |
da8a154e MK |
76 | Use either |
77 | .BR wctomb (3) | |
78 | or the thread-safe | |
79 | .BR wcrtomb (3) | |
80 | instead. | |
47297adb | 81 | .SH SEE ALSO |
11cfb06e | 82 | .BR btowc (3), |
da8a154e | 83 | .BR wcrtomb (3), |
e37e3282 | 84 | .BR wctomb (3) |