1.\" $OpenBSD: wctrans.3,v 1.3 2017/09/05 03:16:13 schwarze Exp $ 2.\" $NetBSD: wctrans.3,v 1.4 2004/01/24 16:58:54 wiz Exp $ 3.\" 4.\" Copyright (c) 2017 Ingo Schwarze <schwarze@openbsd.org> 5.\" Copyright (c) 2003 Citrus Project 6.\" All rights reserved. 7.\" 8.\" Redistribution and use in source and binary forms, with or without 9.\" modification, are permitted provided that the following conditions 10.\" are met: 11.\" 1. Redistributions of source code must retain the above copyright 12.\" notice, this list of conditions and the following disclaimer. 13.\" 2. Redistributions in binary form must reproduce the above copyright 14.\" notice, this list of conditions and the following disclaimer in the 15.\" documentation and/or other materials provided with the distribution. 16.\" 17.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 21.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27.\" SUCH DAMAGE. 28.\" 29.Dd $Mdocdate: September 5 2017 $ 30.Dt WCTRANS 3 31.Os 32.Sh NAME 33.Nm wctrans , 34.Nm wctrans_l 35.Nd get a character mapping identifier by name 36.Sh SYNOPSIS 37.In wctype.h 38.Ft wctrans_t 39.Fn wctrans "const char *charmap" 40.Ft wctrans_t 41.Fn wctrans_l "const char *charmap" "locale_t locale" 42.Sh DESCRIPTION 43These functions return a character mapping identifier 44corresponding to the locale-specific character mapping name 45.Fa charmap . 46This identifier can be used in the subsequent calls of 47.Fn towctrans 48or 49.Fn towctrans_l , 50respectively. 51.Pp 52The following names are defined in all locales: 53.Bd -literal -offset indent 54tolower toupper 55.Ed 56.Pp 57The function 58.Fn wctrans_l 59uses the specified 60.Fa locale , 61whereas 62.Fn wctrans 63uses the thread-specific locale set with 64.Xr uselocale 3 , 65falling back to the global locale set with 66.Xr setlocale 3 . 67.Sh RETURN VALUES 68These functions return the character mapping identifier, or 69.Po Vt wctrans_t Pc Ns 0 70if 71.Fa charmap 72does not corresponding to a valid character mapping name. 73.Sh SEE ALSO 74.Xr newlocale 3 , 75.Xr setlocale 3 , 76.Xr towctrans 3 , 77.Xr towlower 3 , 78.Xr wctype 3 79.Sh STANDARDS 80The 81.Fn wctrans 82function conforms to 83.St -isoC-amd1 , 84and 85.Fn wctrans_l 86to 87.St -p1003.1-2008 . 88.Sh HISTORY 89The 90.Fn wctrans 91function has been available since 92.Ox 3.8 , 93and 94.Fn wctrans_l 95since 96.Ox 6.2 . 97