]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man3/wctob.3
ffix
[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.\"
14.TH WCTOB 3 1999-07-25 "GNU" "Linux Programmer's Manual"
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
MK
29byte.
30If so, it is returned as an unsigned char.
fea681da 31.PP
c13182ef
MK
32Never use this function.
33It cannot help you in writing internationalized
34programs.
35Internationalized programs must never distinguish single-byte and
fea681da
MK
36multi-byte characters.
37.SH "RETURN VALUE"
60a90ecd
MK
38The
39.BR wctob ()
40function returns the single-byte representation of \fIc\fP,
fea681da
MK
41if it exists, of EOF otherwise.
42.SH "CONFORMING TO"
68e1685c 43C99.
fea681da 44.SH NOTES
d9bfdb9c 45The behavior of
60a90ecd 46.BR wctob ()
1274071a
MK
47depends on the
48.B LC_CTYPE
49category of the
fea681da
MK
50current locale.
51.PP
c13182ef
MK
52This function should never be used.
53Internationalized programs must never
54distinguish single-byte and multi-byte characters.
55Use the function
60a90ecd
MK
56.BR wctomb (3)
57instead.
e37e3282
MK
58.SH "SEE ALSO"
59.BR wctomb (3)