1c4f02a89SMax Khon.\" 2c4f02a89SMax Khon.\" Copyright (c) 2003 Ryuichiro Imura 3c4f02a89SMax Khon.\" All rights reserved. 4c4f02a89SMax Khon.\" 5c4f02a89SMax Khon.\" Redistribution and use in source and binary forms, with or without 6c4f02a89SMax Khon.\" modification, are permitted provided that the following conditions 7c4f02a89SMax Khon.\" are met: 8c4f02a89SMax Khon.\" 1. Redistributions of source code must retain the above copyright 9c4f02a89SMax Khon.\" notice, this list of conditions and the following disclaimer. 10c4f02a89SMax Khon.\" 2. Redistributions in binary form must reproduce the above copyright 11c4f02a89SMax Khon.\" notice, this list of conditions and the following disclaimer in the 12c4f02a89SMax Khon.\" documentation and/or other materials provided with the distribution. 13c4f02a89SMax Khon.\" 14c4f02a89SMax Khon.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15c4f02a89SMax Khon.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16c4f02a89SMax Khon.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17c4f02a89SMax Khon.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18c4f02a89SMax Khon.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19c4f02a89SMax Khon.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20c4f02a89SMax Khon.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21c4f02a89SMax Khon.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22c4f02a89SMax Khon.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23c4f02a89SMax Khon.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24c4f02a89SMax Khon.\" SUCH DAMAGE. 25c4f02a89SMax Khon.\" 26c4f02a89SMax Khon.Dd July 17, 2003 27c4f02a89SMax Khon.Dt KICONV 3 28c4f02a89SMax Khon.Os 29c4f02a89SMax Khon.Sh NAME 30c4f02a89SMax Khon.Nm kiconv_add_xlat16_cspair , 310f4e4130SMax Khon.Nm kiconv_add_xlat16_cspairs , 32c4f02a89SMax Khon.Nm kiconv_add_xlat16_table 339f4d0646SRuslan Ermilov.Nd kernel side iconv library 34c4f02a89SMax Khon.Sh LIBRARY 35c4f02a89SMax Khon.Lb libkiconv 36c4f02a89SMax Khon.Sh SYNOPSIS 37c4f02a89SMax Khon.In sys/iconv.h 38c4f02a89SMax Khon.Ft int 39c4f02a89SMax Khon.Fo kiconv_add_xlat16_cspair 40c4f02a89SMax Khon.Fa "const char *tocode" 41c4f02a89SMax Khon.Fa "const char *fromcode" 42c4f02a89SMax Khon.Fa "int flag" 43c4f02a89SMax Khon.Fc 44c4f02a89SMax Khon.Ft int 450f4e4130SMax Khon.Fo kiconv_add_xlat16_cspairs 460f4e4130SMax Khon.Fa "const char *foreigncode" 470f4e4130SMax Khon.Fa "const char *localcode" 480f4e4130SMax Khon.Fc 490f4e4130SMax Khon.Ft int 50c4f02a89SMax Khon.Fo kiconv_add_xlat16_table 51c4f02a89SMax Khon.Fa "const char *tocode" 52c4f02a89SMax Khon.Fa "const char *fromcode" 53c4f02a89SMax Khon.Fa "const void *data" 54c4f02a89SMax Khon.Fa "int datalen" 55c4f02a89SMax Khon.Fc 56c4f02a89SMax Khon.Sh DESCRIPTION 57c4f02a89SMax KhonThe 589f4d0646SRuslan Ermilov.Nm kiconv 59c4f02a89SMax Khonlibrary provides multi-byte character conversion tables for kernel side 60c4f02a89SMax Khoniconv service. 61c4f02a89SMax Khon.Pp 629f4d0646SRuslan ErmilovThe 63c4f02a89SMax Khon.Fn kiconv_add_xlat16_cspair 649f4d0646SRuslan Ermilovfunction 65c4f02a89SMax Khondefines a conversion table using 66c4f02a89SMax Khon.Xr iconv 3 67c4f02a89SMax Khonbetween 689f4d0646SRuslan Ermilov.Fa fromcode 69c4f02a89SMax Khoncharset and 709f4d0646SRuslan Ermilov.Fa tocode 711a0a9345SRuslan Ermilovcharset. 721a0a9345SRuslan ErmilovYou can specify 739f4d0646SRuslan Ermilov.Fa flag 74c4f02a89SMax Khonto determine if 75c4f02a89SMax Khon.Xr tolower 3 76c4f02a89SMax Khon/ 77c4f02a89SMax Khon.Xr toupper 3 78c4f02a89SMax Khonconversion is included in the table. 79c4f02a89SMax KhonThe 809f4d0646SRuslan Ermilov.Fa flag 81c4f02a89SMax Khonhas following values. 82c4f02a89SMax Khon.Pp 839f4d0646SRuslan Ermilov.Bl -tag -width ".Dv KICONV_FROM_LOWER" -compact 849f4d0646SRuslan Ermilov.It Dv KICONV_LOWER 859f4d0646SRuslan Ermilov.It Dv KICONV_FROM_LOWER 86c4f02a89SMax KhonIt generates a tolower table in addition to a character conversion table. 87c4f02a89SMax KhonThe difference between two is tolower 889f4d0646SRuslan Ermilov.Fa tocode 89c4f02a89SMax Khonor tolower 909f4d0646SRuslan Ermilov.Fa fromcode . 919f4d0646SRuslan Ermilov.It Dv KICONV_UPPER 929f4d0646SRuslan Ermilov.It Dv KICONV_FROM_UPPER 93c4f02a89SMax KhonIt generates a toupper table in addition to a character conversion table. 94c4f02a89SMax KhonThe difference between two is toupper 959f4d0646SRuslan Ermilov.Fa tocode 96c4f02a89SMax Khonor toupper 979f4d0646SRuslan Ermilov.Fa fromcode . 98c4f02a89SMax Khon.El 99c4f02a89SMax Khon.Pp 100c4f02a89SMax KhonA tolower/toupper conversion is limited to single-byte characters. 101c4f02a89SMax Khon.Pp 1029f4d0646SRuslan ErmilovThe 1030f4e4130SMax Khon.Fn kiconv_add_xlat16_cspairs 1049f4d0646SRuslan Ermilovfunction 1050f4e4130SMax Khondefines two conversion tables which are from 1069f4d0646SRuslan Ermilov.Fa localcode 1070f4e4130SMax Khonto 1089f4d0646SRuslan Ermilov.Fa foreigncode 1090f4e4130SMax Khonand from 1109f4d0646SRuslan Ermilov.Fa foreigncode 1110f4e4130SMax Khonto 1129f4d0646SRuslan Ermilov.Fa localcode . 1139f4d0646SRuslan ErmilovThese conversion tables also contain both tolower and toupper tables. 1140f4e4130SMax Khon.Pp 1159f4d0646SRuslan ErmilovThe 116c4f02a89SMax Khon.Fn kiconv_add_xlat16_table 1179f4d0646SRuslan Ermilovfunction 118c4f02a89SMax Khondefines a conversion table directly pointed by 1199f4d0646SRuslan Ermilov.Fa data 120c4f02a89SMax Khonwhose length is 1219f4d0646SRuslan Ermilov.Fa datalen , 122c4f02a89SMax Khonnot using 123c4f02a89SMax Khon.Xr iconv 3 . 124c4f02a89SMax Khon.Sh SEE ALSO 125ed1e0e1bSBruce M Simpson.Xr iconv 3 , 126ed1e0e1bSBruce M Simpson.Xr tolower 3 , 127*c928b49eSJohn-Mark Gurney.Xr toupper 3 128