1WCTRANS(3P)                POSIX Programmer's Manual               WCTRANS(3P)
2
3
4

PROLOG

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

NAME

12       wctrans, wctrans_l — define character mapping
13

SYNOPSIS

15       #include <wctype.h>
16
17       wctrans_t wctrans(const char *charclass);
18       wctrans_t wctrans_l(const char *charclass, locale_t locale);
19

DESCRIPTION

21       For wctrans(): The functionality described on this  reference  page  is
22       aligned  with the ISO C standard. Any conflict between the requirements
23       described here and the ISO C standard is unintentional. This volume  of
24       POSIX.1‐2017 defers to the ISO C standard.
25
26       The wctrans() and wctrans_l() functions are defined for valid character
27       mapping names identified in the current  locale.  The  charclass  is  a
28       string  identifying a generic character mapping name for which codeset-
29       specific information is required. The following character mapping names
30       are defined in all locales: tolower and toupper.
31
32       These  functions  shall  return a value of type wctrans_t, which can be
33       used as the second argument to  subsequent  calls  of  towctrans()  and
34       towctrans_l().
35
36       The  wctrans()  and  wctrans_l()  functions  shall  determine values of
37       wctrans_t according to the rules of the coded character set defined  by
38       character  mapping  information  in the current locale or in the locale
39       represented by locale, respectively (category LC_CTYPE).
40
41       The values returned by wctrans() shall be valid until a call to  setlo‐
42       cale() that modifies the category LC_CTYPE.
43
44       The  values  returned  by  wctrans_l()  shall be valid only in calls to
45       towctrans_l() with  a  locale  represented  by  locale  with  the  same
46       LC_CTYPE category value.
47
48       The  behavior is undefined if the locale argument to wctrans_l() is the
49       special locale object LC_GLOBAL_LOCALE or is not a valid locale  object
50       handle.
51

RETURN VALUE

53       The  wctrans()  and  wctrans_l()  functions  shall return 0 and may set
54       errno to indicate the error if the given character mapping name is  not
55       valid for the current locale (category LC_CTYPE); otherwise, they shall
56       return a non-zero object of type wctrans_t that can be used in calls to
57       towctrans() and towctrans_l().
58

ERRORS

60       These functions may fail if:
61
62       EINVAL The  character mapping name pointed to by charclass is not valid
63              in the current locale.
64
65       The following sections are informative.
66

EXAMPLES

68       None.
69

APPLICATION USAGE

71       None.
72

RATIONALE

74       None.
75

FUTURE DIRECTIONS

77       None.
78

SEE ALSO

80       towctrans()
81
82       The Base Definitions volume of POSIX.1‐2017, <wctype.h>
83
85       Portions of this text are reprinted and reproduced in  electronic  form
86       from  IEEE Std 1003.1-2017, Standard for Information Technology -- Por‐
87       table Operating System Interface (POSIX), The Open Group Base  Specifi‐
88       cations  Issue  7, 2018 Edition, Copyright (C) 2018 by the Institute of
89       Electrical and Electronics Engineers, Inc and The Open Group.   In  the
90       event of any discrepancy between this version and the original IEEE and
91       The Open Group Standard, the original IEEE and The Open Group  Standard
92       is  the  referee document. The original Standard can be obtained online
93       at http://www.opengroup.org/unix/online.html .
94
95       Any typographical or formatting errors that appear  in  this  page  are
96       most likely to have been introduced during the conversion of the source
97       files to man page format. To report such errors,  see  https://www.ker
98       nel.org/doc/man-pages/reporting_bugs.html .
99
100
101
102IEEE/The Open Group                  2017                          WCTRANS(3P)
Impressum