1TOWCTRANS(3P)              POSIX Programmer's Manual             TOWCTRANS(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       towctrans, towctrans_l — wide-character transliteration
13

SYNOPSIS

15       #include <wctype.h>
16
17       wint_t towctrans(wint_t wc, wctrans_t desc);
18       wint_t towctrans_l(wint_t wc, wctrans_t desc,
19           locale_t locale);
20

DESCRIPTION

22       For towctrans(): 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‐2017 defers to the ISO C standard.
26
27       The  towctrans()  and  towctrans_l()  functions shall transliterate the
28       wide-character code wc using the mapping described by desc.
29
30       The current setting of the LC_CTYPE category in the current  locale  or
31       in  the  locale represented by locale, respectively, should be the same
32       as during the call to wctrans() or wctrans_l() that returned the  value
33       desc.
34
35       If  the  value  of  desc is invalid (that is, not obtained by a call to
36       wctrans() or desc is invalidated by a subsequent  call  to  setlocale()
37       that has affected category LC_CTYPE), the result is unspecified.
38
39       If  the  value  of  desc is invalid (that is, not obtained by a call to
40       wctrans_l() with the same locale object locale) the result is  unspeci‐
41       fied.
42
43       An  application  wishing to check for error situations should set errno
44       to 0 before calling towctrans() or towctrans_l().
45
46       If errno is non-zero on return, an error has occurred.
47
48       The behavior is undefined if the locale argument  to  towctrans_l()  is
49       the  special  locale  object  LC_GLOBAL_LOCALE or is not a valid locale
50       object handle.
51

RETURN VALUE

53       If successful, the towctrans() and towctrans_l() functions shall return
54       the mapped value of wc using the mapping described by desc.  Otherwise,
55       they shall return wc unchanged.
56

ERRORS

58       These functions may fail if:
59
60       EINVAL desc contains an invalid transliteration descriptor.
61
62       The following sections are informative.
63

EXAMPLES

65       None.
66

APPLICATION USAGE

68       The strings "tolower" and "toupper" are reserved for the standard  map‐
69       ping  names.  In  the table below, the functions in the left column are
70       equivalent to the functions in the right column.
71
72
73           towlower(wc)            towctrans(wc, wctrans("tolower"))
74           towlower_l(wc, locale)  towctrans_l(wc, wctrans("tolower"), locale)
75           towupper(wc)            towctrans(wc, wctrans("toupper"))
76           towupper_l(wc, locale)  towctrans_l(wc, wctrans("toupper"), locale)
77

RATIONALE

79       None.
80

FUTURE DIRECTIONS

82       None.
83

SEE ALSO

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