]>
Commit | Line | Data |
---|---|---|
fea681da MK |
1 | .\" Copyright (c) Bruno Haible <haible@clisp.cons.org> |
2 | .\" | |
3 | .\" This is free documentation; you can redistribute it and/or | |
4 | .\" modify it under the terms of the GNU General Public License as | |
5 | .\" published by the Free Software Foundation; either version 2 of | |
6 | .\" the License, or (at your option) any later version. | |
7 | .\" | |
8 | .\" References consulted: | |
9 | .\" GNU glibc-2 source code and manual | |
10 | .\" Dinkumware C library reference http://www.dinkumware.com/ | |
11 | .\" OpenGroup's Single Unix specification http://www.UNIX-systems.org/online.html | |
12 | .\" ISO/IEC 9899:1999 | |
13 | .\" | |
a16cea5b | 14 | .TH WCTOB 3 2009-02-04 "GNU" "Linux Programmer's Manual" |
fea681da MK |
15 | .SH NAME |
16 | wctob \- try to represent a wide character as a single byte | |
17 | .SH SYNOPSIS | |
18 | .nf | |
19 | .B #include <wchar.h> | |
20 | .sp | |
21 | .BI "int wctob(wint_t " c ); | |
22 | .fi | |
23 | .SH DESCRIPTION | |
60a90ecd MK |
24 | The |
25 | .BR wctob () | |
26 | function tests whether | |
c13182ef | 27 | the multi-byte representation of the |
fea681da | 28 | wide character \fIc\fP, starting in the initial state, consists of a single |
c13182ef | 29 | byte. |
d9a10d9d MK |
30 | If so, it is returned as an |
31 | .IR "unsigned char" . | |
fea681da | 32 | .PP |
c13182ef MK |
33 | Never use this function. |
34 | It cannot help you in writing internationalized | |
35 | programs. | |
36 | Internationalized programs must never distinguish single-byte and | |
fea681da MK |
37 | multi-byte characters. |
38 | .SH "RETURN VALUE" | |
60a90ecd MK |
39 | The |
40 | .BR wctob () | |
41 | function returns the single-byte representation of \fIc\fP, | |
f3fef736 | 42 | if it exists, of \fBEOF\fP otherwise. |
fea681da | 43 | .SH "CONFORMING TO" |
68e1685c | 44 | C99. |
fea681da | 45 | .SH NOTES |
d9bfdb9c | 46 | The behavior of |
60a90ecd | 47 | .BR wctob () |
1274071a MK |
48 | depends on the |
49 | .B LC_CTYPE | |
50 | category of the | |
fea681da MK |
51 | current locale. |
52 | .PP | |
c13182ef MK |
53 | This function should never be used. |
54 | Internationalized programs must never | |
55 | distinguish single-byte and multi-byte characters. | |
56 | Use the function | |
60a90ecd MK |
57 | .BR wctomb (3) |
58 | instead. | |
e37e3282 | 59 | .SH "SEE ALSO" |
a16cea5b | 60 | .BR btowc (3) |
e37e3282 | 61 | .BR wctomb (3) |