ViewVC Help
View File | Revision Log | View Changeset | Root Listing
root/Oni2/Daodan/MSYS2/usr/share/doc/iconv.1.html
Revision: 1166
Committed: Tue Oct 26 14:22:36 2021 UTC (4 years ago) by rossy
Content type: text/html
File size: 6438 byte(s)
Log Message:
Daodan: Replace MinGW build env with an up-to-date MSYS2 env

File Contents

# Content
1 <!-- Creator : groff version 1.22.3 -->
2 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
3 "http://www.w3.org/TR/html4/loose.dtd">
4 <html>
5 <head>
6 <meta name="generator" content="groff -Thtml, see www.gnu.org">
7 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
8 <meta name="Content-Style" content="text/css">
9 <style type="text/css">
10 p { margin-top: 0; margin-bottom: 0; vertical-align: top }
11 pre { margin-top: 0; margin-bottom: 0; vertical-align: top }
12 table { margin-top: 0; margin-bottom: 0; vertical-align: top }
13 h1 { text-align: center }
14 </style>
15 <title>ICONV</title>
16
17 </head>
18 <body>
19
20 <h1 align="center">ICONV</h1>
21
22 <a href="#NAME">NAME</a><br>
23 <a href="#SYNOPSIS">SYNOPSIS</a><br>
24 <a href="#DESCRIPTION">DESCRIPTION</a><br>
25 <a href="#EXAMPLES">EXAMPLES</a><br>
26 <a href="#CONFORMING TO">CONFORMING TO</a><br>
27 <a href="#SEE ALSO">SEE ALSO</a><br>
28
29 <hr>
30
31
32 <h2>NAME
33 <a name="NAME"></a>
34 </h2>
35
36
37 <p style="margin-left:11%; margin-top: 1em">iconv &minus;
38 character set conversion</p>
39
40 <h2>SYNOPSIS
41 <a name="SYNOPSIS"></a>
42 </h2>
43
44
45 <p style="margin-left:11%; margin-top: 1em">iconv
46 [<i>OPTION</i>...] [<b>&minus;f</b> <i>encoding</i>]
47 [<b>&minus;t</b> <i>encoding</i>] [<i>inputfile</i> ...]
48 <br>
49 iconv <b>&minus;l</b></p>
50
51 <h2>DESCRIPTION
52 <a name="DESCRIPTION"></a>
53 </h2>
54
55
56 <p style="margin-left:11%; margin-top: 1em">The
57 <b>iconv</b> program converts text from one encoding to
58 another encoding. More precisely, it converts <b>from</b>
59 the encoding given for the <b>&minus;f</b> option <b>to</b>
60 the encoding given for the <b>&minus;t</b> option. Either of
61 these encodings defaults to the encoding of the current
62 locale. All the <i>inputfile</i>s are read and converted in
63 turn; if no <i>inputfile</i> is given, the standard input is
64 used. The converted text is printed to standard output.</p>
65
66 <p style="margin-left:11%; margin-top: 1em">The encodings
67 permitted are system dependent. For the libiconv
68 implementation, they are listed in the iconv_open(3) manual
69 page.</p>
70
71 <p style="margin-left:11%; margin-top: 1em">Options
72 controlling the input and output format: <b><br>
73 &minus;f</b> <i>encoding</i>,
74 <b>&minus;&minus;from&minus;code=</b><i>encoding</i></p>
75
76 <p style="margin-left:22%;">Specifies the encoding of the
77 input.</p>
78
79 <p style="margin-left:11%;"><b>&minus;t</b>
80 <i>encoding</i>,
81 <b>&minus;&minus;to&minus;code=</b><i>encoding</i></p>
82
83 <p style="margin-left:22%;">Specifies the encoding of the
84 output.</p>
85
86 <p style="margin-left:11%; margin-top: 1em">Options
87 controlling conversion problems:</p>
88
89 <table width="100%" border="0" rules="none" frame="void"
90 cellspacing="0" cellpadding="0">
91 <tr valign="top" align="left">
92 <td width="11%"></td>
93 <td width="3%">
94
95
96 <p><b>&minus;c</b></p></td>
97 <td width="8%"></td>
98 <td width="78%">
99
100
101 <p>When this option is given, characters that cannot be
102 converted are silently discarded, instead of leading to a
103 conversion error.</p></td></tr>
104 </table>
105
106
107 <p style="margin-left:11%;"><b>&minus;&minus;unicode&minus;subst=</b><i>formatstring</i></p>
108
109 <p style="margin-left:22%;">When this option is given,
110 Unicode characters that cannot be represented in the target
111 encoding are replaced with a placeholder string that is
112 constructed from the given <i>formatstring</i>, applied to
113 the Unicode code point. The <i>formatstring</i> must be a
114 format string in the same format as for the <i>printf</i>
115 command or the <i>printf()</i> function, taking either no
116 argument or exactly one unsigned integer argument.</p>
117
118
119 <p style="margin-left:11%;"><b>&minus;&minus;byte&minus;subst=</b><i>formatstring</i></p>
120
121 <p style="margin-left:22%;">When this option is given,
122 bytes in the input that are not valid in the source encoding
123 are replaced with a placeholder string that is constructed
124 from the given <i>formatstring</i>, applied to the
125 byte&rsquo;s value. The <i>formatstring</i> must be a format
126 string in the same format as for the <i>printf</i> command
127 or the <i>printf()</i> function, taking either no argument
128 or exactly one unsigned integer argument.</p>
129
130
131 <p style="margin-left:11%;"><b>&minus;&minus;widechar&minus;subst=</b><i>formatstring</i></p>
132
133 <p style="margin-left:22%;">When this option is given, wide
134 characters in the input that are not valid in the source
135 encoding are replaced with a placeholder string that is
136 constructed from the given <i>formatstring</i>, applied to
137 the byte&rsquo;s value. The <i>formatstring</i> must be a
138 format string in the same format as for the <i>printf</i>
139 command or the <i>printf()</i> function, taking either no
140 argument or exactly one unsigned integer argument.</p>
141
142 <p style="margin-left:11%; margin-top: 1em">Options
143 controlling error output: <b><br>
144 &minus;s</b>, <b>&minus;&minus;silent</b></p>
145
146 <p style="margin-left:22%;">When this option is given,
147 error messages about invalid or unconvertible characters are
148 omitted, but the actual converted text is unaffected.</p>
149
150 <p style="margin-left:11%; margin-top: 1em">The <b>iconv
151 &minus;l</b> or <b>iconv &minus;&minus;list</b> command
152 lists the names of the supported encodings, in a system
153 dependent format. For the libiconv implementation, the names
154 are printed in upper case, separated by whitespace, and
155 alias names of an encoding are listed on the same line as
156 the encoding itself.</p>
157
158 <h2>EXAMPLES
159 <a name="EXAMPLES"></a>
160 </h2>
161
162
163 <p style="margin-left:11%; margin-top: 1em"><b>iconv
164 &minus;f ISO&minus;8859&minus;1 &minus;t UTF&minus;8</b></p>
165
166 <p style="margin-left:22%;">converts input from the old
167 West-European encoding ISO&minus;8859&minus;1 to
168 Unicode.</p>
169
170 <p style="margin-left:11%; margin-top: 1em"><b>iconv
171 &minus;f KOI8&minus;R
172 &minus;&minus;byte&minus;subst=&quot;&lt;0x%x&gt;&quot; <br>
173
174 &minus;&minus;unicode&minus;subst=&quot;&lt;U+%04X&gt;&quot;</b></p>
175
176 <p style="margin-left:22%;">converts input from the old
177 Russian encoding KOI8&minus;R to the locale encoding,
178 substituting an angle bracket notation with hexadecimal
179 numbers for invalid bytes and for valid but unconvertible
180 characters.</p>
181
182 <p style="margin-left:11%;"><b>iconv
183 &minus;&minus;list</b></p>
184
185 <p style="margin-left:22%;">lists the supported
186 encodings.</p>
187
188 <h2>CONFORMING TO
189 <a name="CONFORMING TO"></a>
190 </h2>
191
192
193 <p style="margin-left:11%; margin-top: 1em">POSIX:2001</p>
194
195 <h2>SEE ALSO
196 <a name="SEE ALSO"></a>
197 </h2>
198
199
200
201 <p style="margin-left:11%; margin-top: 1em"><b>iconv_open</b>(3),
202 <b>locale</b>(7)</p>
203 <hr>
204 </body>
205 </html>