towctrans, or towctrans_l Subroutine

Purpose

Character transliteration.

Library

Standard library (libc.a)

Syntax

#include <wctype.h>
wint_t towctrans (wint_t wc, wctrans_t desc); 
wint_t towctrans_l (wint_t wc, wctrans_t desc, locale_t Locale);

Description

The towctrans and towctrans_l functions transliterates the wide-character code wc using the mapping described by desc. The current setting of the LC_CTYPE category in the current locale of the process or in the locale represented by Locale, respectively, should be the same as during the call to wctrans or wctrans_l that returned the value desc. If the value of desc is invalid (that is, not obtained by a call to wctrans or desc is invalidated by a subsequent call to setlocale that has affected category LC_CTYPE or not obtained by a call to wctrans_l with the same locale object Locale) the result is implementation-dependent.

Return Values

If successful, the towctrans, and towctrans_l functions return the mapped value of wc using the mapping described by desc. Otherwise it returns wc unchanged.

Error Codes

The towctrans, and towctrans_l function may fail if:

Item Description
EINVAL desc contains an invalid transliteration descriptor.