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