1 .\" Copyright (c) Bruno Haible <haible@clisp.cons.org>
3 .\" This is free documentation; you can redistribute it and/or
4 .\" modify it under the terms of the GNU General Public License as
5 .\" published by the Free Software Foundation; either version 2 of
6 .\" the License, or (at your option) any later version.
8 .\" References consulted:
9 .\" GNU glibc-2 source code and manual
10 .\" OpenGroup's Single UNIX specification
11 .\" http://www.UNIX-systems.org/online.html
13 .\" 2007-03-31 Bruno Haible, Describe the glibc/libiconv //TRANSLIT
14 .\" and //IGNORE extensions for 'tocode'.
16 .\" Japanese Version Copyright (c) 2000 Yuichi SATO
17 .\" all rights reserved.
18 .\" Translated Tue Jul 11 19:02:58 JST 2000
19 .\" by Yuichi SATO <sato@complex.eng.hokudai.ac.jp>
20 .\" Updated 2007-06-01, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v2.50
22 .\"WORD: allocate 割り当てる
23 .\"WORD: descriptor ディスクリプタ
24 .\"WORD: conversion 変換
27 .TH ICONV_OPEN 3 2008-08-11 "GNU" "Linux Programmer's Manual"
30 .\"O iconv_open \- allocate descriptor for character set conversion
31 iconv_open \- 文字セット変換のためのディスクリプタを割り当てる
37 .BI "iconv_t iconv_open(const char *" tocode ", const char *" fromcode );
42 .\"O .BR iconv_open ()
43 .\"O function allocates a conversion descriptor suitable
44 .\"O for converting byte sequences from character encoding \fIfromcode\fP to
45 .\"O character encoding \fItocode\fP.
47 関数は、文字エンコーディング \fIfromcode\fP から
48 文字エンコーディング \fItocode\fP へのバイト文字列変換に適した
51 .\"O The values permitted for \fIfromcode\fP and \fItocode\fP and the supported
52 .\"O combinations are system-dependent.
53 .\"O For the GNU C library, the permitted
54 .\"O values are listed by the \fBiconv \-\-list\fP command, and all combinations
55 .\"O of the listed values are supported.
56 \fIfromcode\fP と \fItocode\fP に使うことのできる値と、
57 サポートされる組み合わせは、システムに依存する。
58 GNU C ライブラリでは、使うことのできる値は
59 \fBiconv \-\-list\fP コマンドでリストされ、
60 リストされたすべての値の組み合わせがサポートされる。
61 .\"O Furthermore the GNU C library and the
62 .\"O GNU libiconv library support the following two suffixes:
63 さらに、 GNU C ライブラリと GNU libiconv ライブラリでは、
67 .\"O When the string "//TRANSLIT" is appended to \fItocode\fP, transliteration
69 .\"O This means that when a character cannot be represented in the
70 .\"O target character set, it can be approximated through one or several
71 .\"O similarly looking characters.
72 \fItocode\fP の後ろに文字列 "//TRANSLIT" が付いている場合、
73 翻訳 (transliteration) が有効になる。この場合、
74 変換先の文字セットで表現できない文字を、その文字と同じように見える
75 文字 (複数文字の場合もある) で表現することができる。
78 .\"O When the string "//IGNORE" is appended to \fItocode\fP, characters that
79 .\"O cannot be represented in the target character set will be silently discarded.
80 \fItocode\fP の後ろに文字列 "//IGNORE" が付いている場合、
81 変換先の文字セットで表現できない文字は黙って無視される。
83 .\"O The resulting conversion descriptor can be used with
85 .\"O any number of times.
86 .\"O It remains valid until deallocated using
87 .\"O .BR iconv_close (3).
88 この関数を読んで得られた変換ディスクリプタは、
96 .\"O A conversion descriptor contains a conversion state.
97 .\"O After creation using
98 .\"O .BR iconv_open (),
99 .\"O the state is in the initial state.
102 .\"O modifies the descriptor's conversion state.
103 .\"O (This implies that a conversion
104 .\"O descriptor can not be used in multiple threads simultaneously.)
105 .\"O To bring the state back to the initial state, use
107 .\"O with NULL as \fIinbuf\fP argument.
110 を用いて生成された後、変換状態は初期状態である。
112 を使うことにより、ディスクリプタの変換状態が変更される。
114 同時に使うことができないことを意味している。)
116 \fIinbuf\fP 引き数を NULL として
119 .\"O .SH "RETURN VALUE"
122 .\"O .BR iconv_open ()
123 .\"O function returns a freshly allocated conversion
125 .\"O In case of error, it sets \fIerrno\fP and returns
126 .\"O .IR (iconv_t)\ \-1 .
128 関数は、新たに割り当てられた変換ディスクリプタを返す。
129 エラーの場合、この関数は \fIerrno\fP を設定し、
134 .\"O The following error can occur, among others:
137 .\"O The conversion from \fIfromcode\fP to \fItocode\fP is not supported by the
139 他のいろいろなエラーのうち、以下のエラーが起こりうる。
142 \fIfromcode\fP から \fItocode\fP への変換は、この実装ではサポートされていない。
145 .\"O This function is available in glibc since version 2.1.
146 この関数はバージョン 2.1 以降の glibc で利用可能である。
147 .\"O .SH "CONFORMING TO"
149 UNIX98, POSIX.1-2001.