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
11

NAME

13       towctrans, towctrans_l — wide-character transliteration
14

SYNOPSIS

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

DESCRIPTION

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

RETURN VALUE

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

ERRORS

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

EXAMPLES

66       None.
67

APPLICATION USAGE

69       The strings "tolower" and "toupper" are reserved for the standard  map‐
70       ping  names.  In  the table below, the functions in the left column are
71       equivalent to the functions in the right column.
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‐2008, <wctype.h>
88
90       Portions of this text are reprinted and reproduced in  electronic  form
91       from IEEE Std 1003.1, 2013 Edition, Standard for Information Technology
92       -- Portable Operating System Interface (POSIX),  The  Open  Group  Base
93       Specifications Issue 7, Copyright (C) 2013 by the Institute of Electri‐
94       cal and Electronics Engineers,  Inc  and  The  Open  Group.   (This  is
95       POSIX.1-2008  with  the  2013  Technical Corrigendum 1 applied.) In the
96       event of any discrepancy between this version and the original IEEE and
97       The  Open Group Standard, the original IEEE and The Open Group Standard
98       is the referee document. The original Standard can be  obtained  online
99       at http://www.unix.org/online.html .
100
101       Any  typographical  or  formatting  errors that appear in this page are
102       most likely to have been introduced during the conversion of the source
103       files  to  man page format. To report such errors, see https://www.ker
104       nel.org/doc/man-pages/reporting_bugs.html .
105
106
107
108IEEE/The Open Group                  2013                        TOWCTRANS(3P)
Impressum