TOWCTRANS(3)               POSIX Programmer's Manual              TOWCTRANS(3)



PPRROOLLOOGG
       This manual page is part of the POSIX Programmer's Manual.  The OS
       implementation of this interface may differ (consult the corresponding
       OS manual page for details of OS behavior), or the interface may not be
       implemented on OS.


NNAAMMEE
       towctrans, towctrans_l -- wide-character transliteration

SSYYNNOOPPSSIISS
       #include <wctype.h>

       wint_t towctrans(wint_t _w_c, wctrans_t _d_e_s_c);
       wint_t towctrans_l(wint_t _w_c, wctrans_t _d_e_s_c,
           locale_t _l_o_c_a_l_e);

DDEESSCCRRIIPPTTIIOONN
       For _t_o_w_c_t_r_a_n_s(): The functionality described on this reference page is
       aligned with the ISO C standard. Any conflict between the requirements
       described here and the ISO C standard is unintentional. This volume of
       POSIX.1-2008 defers to the ISO C standard.

       The _t_o_w_c_t_r_a_n_s() and _t_o_w_c_t_r_a_n_s___l() functions shall transliterate the
       wide-character code _w_c using the mapping described by _d_e_s_c.

       The current setting of the _L_C___C_T_Y_P_E category in the current locale or
       in the locale represented by _l_o_c_a_l_e, respectively, should be the same
       as during the call to _w_c_t_r_a_n_s() or _w_c_t_r_a_n_s___l() that returned the value
       _d_e_s_c.

       If the value of _d_e_s_c is invalid (that is, not obtained by a call to
       _w_c_t_r_a_n_s() or _d_e_s_c is invalidated by a subsequent call to _s_e_t_l_o_c_a_l_e()
       that has affected category _L_C___C_T_Y_P_E), the result is unspecified.

       If the value of _d_e_s_c is invalid (that is, not obtained by a call to
       _w_c_t_r_a_n_s___l() with the same locale object _l_o_c_a_l_e) the result is
       unspecified.

       An application wishing to check for error situations should set _e_r_r_n_o
       to 0 before calling _t_o_w_c_t_r_a_n_s() or _t_o_w_c_t_r_a_n_s___l().

       If _e_r_r_n_o is non-zero on return, an error has occurred.

       The behavior is undefined if the _l_o_c_a_l_e argument to _t_o_w_c_t_r_a_n_s___l() is
       the special locale object LC_GLOBAL_LOCALE or is not a valid locale
       object handle.

RREETTUURRNN VVAALLUUEE
       If successful, the _t_o_w_c_t_r_a_n_s() and _t_o_w_c_t_r_a_n_s___l() functions shall return
       the mapped value of _w_c using the mapping described by _d_e_s_c.  Otherwise,
       they shall return _w_c unchanged.

EERRRROORRSS
       These functions may fail if:

       EEIINNVVAALL _d_e_s_c contains an invalid transliteration descriptor.

       _T_h_e _f_o_l_l_o_w_i_n_g _s_e_c_t_i_o_n_s _a_r_e _i_n_f_o_r_m_a_t_i_v_e_.

EEXXAAMMPPLLEESS
       None.

AAPPPPLLIICCAATTIIOONN UUSSAAGGEE
       The strings ""ttoolloowweerr"" and ""ttoouuppppeerr"" are reserved for the standard
       mapping names. In the table below, the functions in the left column are
       equivalent to the functions in the right column.

           ttoowwlloowweerr((_w_c))            ttoowwccttrraannss((_w_c,, wwccttrraannss((""ttoolloowweerr""))))
           ttoowwlloowweerr__ll((_w_c,, _l_o_c_a_l_e))  ttoowwccttrraannss__ll((_w_c,, wwccttrraannss((""ttoolloowweerr"")),, _l_o_c_a_l_e))
           ttoowwuuppppeerr((_w_c))            ttoowwccttrraannss((_w_c,, wwccttrraannss((""ttoouuppppeerr""))))
           ttoowwuuppppeerr__ll((_w_c,, _l_o_c_a_l_e))  ttoowwccttrraannss__ll((_w_c,, wwccttrraannss((""ttoouuppppeerr"")),, _l_o_c_a_l_e))

RRAATTIIOONNAALLEE
       None.

FFUUTTUURREE DDIIRREECCTTIIOONNSS
       None.

SSEEEE AALLSSOO
       _t_o_w_l_o_w_e_r(), _t_o_w_u_p_p_e_r(), _w_c_t_r_a_n_s()

       The Base Definitions volume of POSIX.1-2008, <<wwccttyyppee..hh>>

CCOOPPYYRRIIGGHHTT
       Portions of this text are reprinted and reproduced in electronic form
       from IEEE Std 1003.1, 2013 Edition, Standard for Information Technology
       -- Portable Operating System Interface (POSIX), The Open Group Base
       Specifications Issue 7, Copyright (C) 2013 by the Institute of
       Electrical and Electronics Engineers, Inc and The Open Group.  (This is
       POSIX.1-2008 with the 2013 Technical Corrigendum 1 applied.) In the
       event of any discrepancy between this version and the original IEEE and
       The Open Group Standard, the original IEEE and The Open Group Standard
       is the referee document. The original Standard can be obtained online
       at http://www.unix.org/online.html .

       Any typographical or formatting errors that appear in this page are
       most likely to have been introduced during the conversion of the source
       files to man page format. To report such errors, see
       https://www.kernel.org/doc/man-pages/reporting_bugs.html .



IEEE/The Open Group                  2013                         TOWCTRANS(3)
