]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man3/wctob.3
wctob.3: SEE ALSO: add btowc(3)
[thirdparty/man-pages.git] / man3 / wctob.3
CommitLineData
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
16wctob \- 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
24The
25.BR wctob ()
26function tests whether
c13182ef 27the multi-byte representation of the
fea681da 28wide character \fIc\fP, starting in the initial state, consists of a single
c13182ef 29byte.
d9a10d9d
MK
30If so, it is returned as an
31.IR "unsigned char" .
fea681da 32.PP
c13182ef
MK
33Never use this function.
34It cannot help you in writing internationalized
35programs.
36Internationalized programs must never distinguish single-byte and
fea681da
MK
37multi-byte characters.
38.SH "RETURN VALUE"
60a90ecd
MK
39The
40.BR wctob ()
41function returns the single-byte representation of \fIc\fP,
f3fef736 42if it exists, of \fBEOF\fP otherwise.
fea681da 43.SH "CONFORMING TO"
68e1685c 44C99.
fea681da 45.SH NOTES
d9bfdb9c 46The behavior of
60a90ecd 47.BR wctob ()
1274071a
MK
48depends on the
49.B LC_CTYPE
50category of the
fea681da
MK
51current locale.
52.PP
c13182ef
MK
53This function should never be used.
54Internationalized programs must never
55distinguish single-byte and multi-byte characters.
56Use the function
60a90ecd
MK
57.BR wctomb (3)
58instead.
e37e3282 59.SH "SEE ALSO"
a16cea5b 60.BR btowc (3)
e37e3282 61.BR wctomb (3)