1WCTRANS(3P) POSIX Programmer's Manual WCTRANS(3P)
2
3
4
6 This manual page is part of the POSIX Programmer's Manual. The Linux
7 implementation of this interface may differ (consult the corresponding
8 Linux manual page for details of Linux behavior), or the interface may
9 not be implemented on Linux.
10
11
13 wctrans, wctrans_l — define character mapping
14
16 #include <wctype.h>
17
18 wctrans_t wctrans(const char *charclass);
19 wctrans_t wctrans_l(const char *charclass, locale_t locale);
20
22 For wctrans(): The functionality described on this reference page is
23 aligned with the ISO C standard. Any conflict between the requirements
24 described here and the ISO C standard is unintentional. This volume of
25 POSIX.1‐2008 defers to the ISO C standard.
26
27 The wctrans() and wctrans_l() functions are defined for valid character
28 mapping names identified in the current locale. The charclass is a
29 string identifying a generic character mapping name for which codeset-
30 specific information is required. The following character mapping names
31 are defined in all locales: tolower and toupper.
32
33 These functions shall return a value of type wctrans_t, which can be
34 used as the second argument to subsequent calls of towctrans() and
35 towctrans_l().
36
37 The wctrans() and wctrans_l() functions shall determine values of
38 wctrans_t according to the rules of the coded character set defined by
39 character mapping information in the current locale or in the locale
40 represented by locale, respectively (category LC_CTYPE).
41
42 The values returned by wctrans() shall be valid until a call to setlo‐
43 cale() that modifies the category LC_CTYPE.
44
45 The values returned by wctrans_l() shall be valid only in calls to
46 towctrans_l() with a locale represented by locale with the same
47 LC_CTYPE category value.
48
49 The behavior is undefined if the locale argument to wctrans_l() is the
50 special locale object LC_GLOBAL_LOCALE or is not a valid locale object
51 handle.
52
54 The wctrans() and wctrans_l() functions shall return 0 and may set
55 errno to indicate the error if the given character mapping name is not
56 valid for the current locale (category LC_CTYPE); otherwise, they shall
57 return a non-zero object of type wctrans_t that can be used in calls to
58 towctrans() and towctrans_l().
59
61 These functions may fail if:
62
63 EINVAL The character mapping name pointed to by charclass is not valid
64 in the current locale.
65
66 The following sections are informative.
67
69 None.
70
72 None.
73
75 None.
76
78 None.
79
81 towctrans()
82
83 The Base Definitions volume of POSIX.1‐2008, <wctype.h>
84
86 Portions of this text are reprinted and reproduced in electronic form
87 from IEEE Std 1003.1, 2013 Edition, Standard for Information Technology
88 -- Portable Operating System Interface (POSIX), The Open Group Base
89 Specifications Issue 7, Copyright (C) 2013 by the Institute of Electri‐
90 cal and Electronics Engineers, Inc and The Open Group. (This is
91 POSIX.1-2008 with the 2013 Technical Corrigendum 1 applied.) In the
92 event of any discrepancy between this version and the original IEEE and
93 The Open Group Standard, the original IEEE and The Open Group Standard
94 is the referee document. The original Standard can be obtained online
95 at http://www.unix.org/online.html .
96
97 Any typographical or formatting errors that appear in this page are
98 most likely to have been introduced during the conversion of the source
99 files to man page format. To report such errors, see https://www.ker‐
100 nel.org/doc/man-pages/reporting_bugs.html .
101
102
103
104IEEE/The Open Group 2013 WCTRANS(3P)