1WCTRANS(P) POSIX Programmer's Manual WCTRANS(P)
2
3
4
6 wctrans - define character mapping
7
9 #include <wctype.h>
10
11 wctrans_t wctrans(const char *charclass);
12
13
15 The wctrans() function is defined for valid character mapping names
16 identified in the current locale. The charclass is a string identifying
17 a generic character mapping name for which codeset-specific information
18 is required. The following character mapping names are defined in all
19 locales: tolower and toupper.
20
21 The function shall return a value of type wctrans_t, which can be used
22 as the second argument to subsequent calls of towctrans(). The
23 wctrans() function shall determine values of wctrans_t according to the
24 rules of the coded character set defined by character mapping informa‐
25 tion in the program's locale (category LC_CTYPE ). The values returned
26 by wctrans() shall be valid until a call to setlocale() that modifies
27 the category LC_CTYPE .
28
30 The wctrans() function shall return 0 and may set errno to indicate
31 the error if the given character mapping name is not valid for the
32 current locale (category LC_CTYPE ); otherwise, it shall return a non-
33 zero object of type wctrans_t that can be used in calls to towctrans().
34
36 The wctrans() function may fail if:
37
38 EINVAL The character mapping name pointed to by charclass is not valid
39 in the current locale.
40
41
42 The following sections are informative.
43
45 None.
46
48 None.
49
51 None.
52
54 None.
55
57 towctrans() , the Base Definitions volume of IEEE Std 1003.1-2001,
58 <wctype.h>
59
61 Portions of this text are reprinted and reproduced in electronic form
62 from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
63 -- Portable Operating System Interface (POSIX), The Open Group Base
64 Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
65 Electrical and Electronics Engineers, Inc and The Open Group. In the
66 event of any discrepancy between this version and the original IEEE and
67 The Open Group Standard, the original IEEE and The Open Group Standard
68 is the referee document. The original Standard can be obtained online
69 at http://www.opengroup.org/unix/online.html .
70
71
72
73IEEE/The Open Group 2003 WCTRANS(P)