]>
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 | .\" | |
14 | .TH BTOWC 3 1999-07-25 "GNU" "Linux Programmer's Manual" | |
15 | .SH NAME | |
16 | btowc \- convert single byte to wide character | |
17 | .SH SYNOPSIS | |
18 | .nf | |
19 | .B #include <wchar.h> | |
20 | .sp | |
21 | .BI "wint_t btowc(int " c ); | |
22 | .fi | |
23 | .SH DESCRIPTION | |
e511ffb6 | 24 | The \fBbtowc\fP() function converts \fIc\fP, interpreted as a multibyte sequence |
fea681da MK |
25 | of length 1, starting in the initial shift state, to a wide character and |
26 | returns it. If \fIc\fP is EOF or not a valid multibyte sequence of length 1, | |
e511ffb6 | 27 | the \fBbtowc\fP() function returns WEOF. |
fea681da | 28 | .SH "RETURN VALUE" |
e511ffb6 | 29 | The \fBbtowc\fP() function returns the wide character converted from the single |
fea681da MK |
30 | byte \fIc\fP. If \fIc\fP is EOF or not a valid multibyte sequence of length 1, |
31 | it returns WEOF. | |
32 | .SH "CONFORMING TO" | |
33 | ISO/ANSI C, UNIX98 | |
34 | .SH "SEE ALSO" | |
35 | .BR mbtowc (3) | |
36 | .SH NOTES | |
e511ffb6 | 37 | The behaviour of \fBbtowc\fP() depends on the LC_CTYPE category of the |
fea681da MK |
38 | current locale. |
39 | .PP | |
40 | This function should never be used. It does not work for encodings which have | |
41 | state, and unnecessarily treats single bytes differently from multibyte | |
42 | sequences. Use the function \fBmbtowc\fP instead. |