]> git.ipfire.org Git - thirdparty/man-pages.git/blame_incremental - man3/wctob.3
rename.2: SEE ALSO: add rename(1)
[thirdparty/man-pages.git] / man3 / wctob.3
... / ...
CommitLineData
1.\" Copyright (c) Bruno Haible <haible@clisp.cons.org>
2.\"
3.\" %%%LICENSE_START(GPLv2+_DOC_ONEPARA)
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.
8.\" %%%LICENSE_END
9.\"
10.\" References consulted:
11.\" GNU glibc-2 source code and manual
12.\" Dinkumware C library reference http://www.dinkumware.com/
13.\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html
14.\" ISO/IEC 9899:1999
15.\"
16.TH WCTOB 3 2017-09-15 "GNU" "Linux Programmer's Manual"
17.SH NAME
18wctob \- try to represent a wide character as a single byte
19.SH SYNOPSIS
20.nf
21.B #include <wchar.h>
22.PP
23.BI "int wctob(wint_t " c );
24.fi
25.SH DESCRIPTION
26The
27.BR wctob ()
28function tests whether
29the multibyte representation of the
30wide character
31.IR c ,
32starting in the initial state, consists of a single
33byte.
34If so, it is returned as an
35.IR "unsigned char" .
36.PP
37Never use this function.
38It cannot help you in writing internationalized
39programs.
40Internationalized programs must never distinguish single-byte and
41multibyte characters.
42.SH RETURN VALUE
43The
44.BR wctob ()
45function returns the single-byte representation of
46.IR c ,
47if it exists, of
48.B EOF
49otherwise.
50.SH ATTRIBUTES
51For an explanation of the terms used in this section, see
52.BR attributes (7).
53.TS
54allbox;
55lb lb lb
56l l l.
57Interface Attribute Value
58T{
59.BR wctob ()
60T} Thread safety MT-Safe
61.TE
62.sp 1
63.SH CONFORMING TO
64POSIX.1-2001, POSIX.1-2008, C99.
65.SH NOTES
66The behavior of
67.BR wctob ()
68depends on the
69.B LC_CTYPE
70category of the
71current locale.
72.PP
73This function should never be used.
74Internationalized programs must never
75distinguish single-byte and multibyte characters.
76Use either
77.BR wctomb (3)
78or the thread-safe
79.BR wcrtomb (3)
80instead.
81.SH SEE ALSO
82.BR btowc (3),
83.BR wcrtomb (3),
84.BR wctomb (3)