1.\" 2.\" Copyright (c) 2003 Ryuichiro Imura 3.\" All rights reserved. 4.\" 5.\" Redistribution and use in source and binary forms, with or without 6.\" modification, are permitted provided that the following conditions 7.\" are met: 8.\" 1. Redistributions of source code must retain the above copyright 9.\" notice, this list of conditions and the following disclaimer. 10.\" 2. Redistributions in binary form must reproduce the above copyright 11.\" notice, this list of conditions and the following disclaimer in the 12.\" documentation and/or other materials provided with the distribution. 13.\" 14.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24.\" SUCH DAMAGE. 25.\" 26.\" $FreeBSD$ 27.\" 28.Dd July 17, 2003 29.Dt KICONV 3 30.Os 31.Sh NAME 32.Nm kiconv_add_xlat16_cspair , 33.Nm kiconv_add_xlat16_table 34.Nd Kernel side iconv library 35.Sh LIBRARY 36.Lb libkiconv 37.Sh SYNOPSIS 38.In sys/iconv.h 39.Ft int 40.Fo kiconv_add_xlat16_cspair 41.Fa "const char *tocode" 42.Fa "const char *fromcode" 43.Fa "int flag" 44.Fc 45.Ft int 46.Fo kiconv_add_xlat16_table 47.Fa "const char *tocode" 48.Fa "const char *fromcode" 49.Fa "const void *data" 50.Fa "int datalen" 51.Fc 52.Sh DESCRIPTION 53The 54.Xr kiconv 3 55library provides multi-byte character conversion tables for kernel side 56iconv service. 57.Pp 58.Fn kiconv_add_xlat16_cspair 59defines a conversion table using 60.Xr iconv 3 61between 62.Ar fromcode 63charset and 64.Ar tocode 65charset. You can specify 66.Ar flag 67to determine if 68.Xr tolower 3 69/ 70.Xr toupper 3 71conversion is included in the table. 72The 73.Ar flag 74has following values. 75.Pp 76.Bl -tag -width "KICONV_FROM_LOWER" -compact 77.It Fa KICONV_LOWER 78.It Fa KICONV_FROM_LOWER 79It generates a tolower table in addition to a character conversion table. 80The difference between two is tolower 81.Ar tocode 82or tolower 83.Ar fromcode . 84.It Fa KICONV_UPPER 85.It Fa KICONV_FROM_UPPER 86It generates a toupper table in addition to a character conversion table. 87The difference between two is toupper 88.Ar tocode 89or toupper 90.Ar fromcode . 91.El 92.Pp 93A tolower/toupper conversion is limited to single-byte characters. 94.Pp 95.Fn kiconv_add_xlat16_table 96defines a conversion table directly pointed by 97.Ar data 98whose length is 99.Ar datalen , 100not using 101.Xr iconv 3 . 102.Sh SEE ALSO 103.Xr iconv 3 104.Xr tolower 3 105.Xr toupper 3 106.Xr iconv 9 107