OpenBSD manual page server

Manual Page Search Parameters

TOWCTRANS(3) Library Functions Manual TOWCTRANS(3)

towctrans, towctrans_lconvert a wide character with a specified map

#include <wctype.h>

wint_t
towctrans(wint_t wc, wctrans_t charmap);

wint_t
towctrans_l(wint_t wc, wctrans_t charmap, locale_t locale);

These functions convert the wide character wc with a character mapping charmap.

The behaviour is undefined if charmap or wc is invalid. When charmap is retrieved with wctrans(3), it becomes invalid when the thread-specific character encoding locale is changed with uselocale(3) or when the global character encoding locale is changed with setlocale(3). When charmap is retrieved with wctrans_l(3), it is only valid for use with the same locale argument.

These functions return the resulting wide character, or wc if there is no corresponding character in charmap.

iswctype(3), newlocale(3), setlocale(3), towlower(3), wctrans(3)

The towctrans() function conforms to ISO/IEC 9899/AMD1:1995 (“ISO C90, Amendment 1”), and towctrans_l() to IEEE Std 1003.1-2008 (“POSIX.1”).

The towctrans() function has been available since OpenBSD 3.8, and towctrans_l() since OpenBSD 6.2.

September 5, 2017 OpenBSD-6.2