'\" te .\" Copyright (c) 2002, Sun Microsystems, Inc. All Rights Reserved .TH wctrans 3C "14 Aug 2002" "SunOS 5.11" "Standard C Library Functions" .SH NAME wctrans \- define character mapping .SH SYNOPSIS .LP .nf #include \fBwctrans_t\fR \fBwctrans\fR(\fBconst char *\fR\fIcharclass\fR); .fi .SH DESCRIPTION .sp .LP The \fBwctrans()\fR function is defined for valid character mapping names identified in the current locale. The \fIcharclass\fR is a string identifying a generic character mapping name for which codeset-specific information is required. The following character mapping names are defined in all locales \(mi "tolower" and "toupper". .sp .LP The function returns a value of type \fBwctrans_t\fR, which can be used as the second argument to subsequent calls of \fBtowctrans\fR(3C). The \fBwctrans()\fR function determines values of \fBwctrans_t\fR according to the rules of the coded character set defined by character mapping information in the program's locale (category \fBLC_CTYPE\fR). The values returned by \fBwctrans()\fR are valid until a call to \fBsetlocale\fR(3C) that modifies the category \fBLC_CTYPE\fR. .SH RETURN VALUES .sp .LP The \fBwctrans()\fR function returns \fB0\fR if the given character mapping name is not valid for the current locale (category \fBLC_CTYPE\fR), otherwise it returns a non-zero object of type \fBwctrans_t\fR that can be used in calls to \fBtowctrans\fR(3C). .SH ERRORS .sp .LP The \fBwctrans()\fR function may fail if: .sp .ne 2 .mk .na \fB\fBEINVAL\fR\fR .ad .RS 10n .rt The character mapping name pointed to by \fIcharclass\fR is not valid in the current locale. .RE .SH ATTRIBUTES .sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp .sp .TS tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . ATTRIBUTE TYPEATTRIBUTE VALUE _ CSIEnabled _ Interface StabilityCommitted _ MT-LevelMT-Safe with exceptions _ StandardSee \fBstandards\fR(5). .TE .SH SEE ALSO .sp .LP \fBsetlocale\fR(3C), \fBtowctrans\fR(3C), \fBattributes\fR(5), \fBstandards\fR(5)