OSDN Git Service

f72c6686ae74b24abe893385b6b27d82b2f09e9e
[linuxjm/LDP_man-pages.git] / original / man3 / wctob.3
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 2011-09-22 "GNU" "Linux Programmer's Manual"
17 .SH NAME
18 wctob \- try to represent a wide character as a single byte
19 .SH SYNOPSIS
20 .nf
21 .B #include <wchar.h>
22 .sp
23 .BI "int wctob(wint_t " c );
24 .fi
25 .SH DESCRIPTION
26 The
27 .BR wctob ()
28 function tests whether
29 the multibyte representation of the
30 wide character
31 .IR c ,
32 starting in the initial state, consists of a single
33 byte.
34 If so, it is returned as an
35 .IR "unsigned char" .
36 .PP
37 Never use this function.
38 It cannot help you in writing internationalized
39 programs.
40 Internationalized programs must never distinguish single-byte and
41 multibyte characters.
42 .SH RETURN VALUE
43 The
44 .BR wctob ()
45 function returns the single-byte representation of
46 .IR c ,
47 if it exists, of
48 .B EOF
49 otherwise.
50 .SH CONFORMING TO
51 C99.
52 .SH NOTES
53 The behavior of
54 .BR wctob ()
55 depends on the
56 .B LC_CTYPE
57 category of the
58 current locale.
59 .PP
60 This function should never be used.
61 Internationalized programs must never
62 distinguish single-byte and multibyte characters.
63 Use either
64 .BR wctomb (3)
65 or the thread-safe
66 .BR wcrtomb (3)
67 instead.
68 .SH SEE ALSO
69 .BR btowc (3),
70 .BR wcrtomb (3),
71 .BR wctomb (3)
72 .SH COLOPHON
73 This page is part of release 3.67 of the Linux
74 .I man-pages
75 project.
76 A description of the project,
77 information about reporting bugs,
78 and the latest version of this page,
79 can be found at
80 \%http://www.kernel.org/doc/man\-pages/.