source: Daodan/MSYS2/usr/share/doc/iconv.1.html@ 1173

Last change on this file since 1173 was 1166, checked in by rossy, 3 years ago

Daodan: Replace MinGW build env with an up-to-date MSYS2 env

File size: 6.3 KB
RevLine 
[1166]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;
38character 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>
49iconv <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
58another encoding. More precisely, it converts <b>from</b>
59the encoding given for the <b>&minus;f</b> option <b>to</b>
60the encoding given for the <b>&minus;t</b> option. Either of
61these encodings defaults to the encoding of the current
62locale. All the <i>inputfile</i>s are read and converted in
63turn; if no <i>inputfile</i> is given, the standard input is
64used. The converted text is printed to standard output.</p>
65
66<p style="margin-left:11%; margin-top: 1em">The encodings
67permitted are system dependent. For the libiconv
68implementation, they are listed in the iconv_open(3) manual
69page.</p>
70
71<p style="margin-left:11%; margin-top: 1em">Options
72controlling 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
77input.</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
84output.</p>
85
86<p style="margin-left:11%; margin-top: 1em">Options
87controlling 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
102converted are silently discarded, instead of leading to a
103conversion 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,
110Unicode characters that cannot be represented in the target
111encoding are replaced with a placeholder string that is
112constructed from the given <i>formatstring</i>, applied to
113the Unicode code point. The <i>formatstring</i> must be a
114format string in the same format as for the <i>printf</i>
115command or the <i>printf()</i> function, taking either no
116argument 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,
122bytes in the input that are not valid in the source encoding
123are replaced with a placeholder string that is constructed
124from the given <i>formatstring</i>, applied to the
125byte&rsquo;s value. The <i>formatstring</i> must be a format
126string in the same format as for the <i>printf</i> command
127or the <i>printf()</i> function, taking either no argument
128or 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
134characters in the input that are not valid in the source
135encoding are replaced with a placeholder string that is
136constructed from the given <i>formatstring</i>, applied to
137the byte&rsquo;s value. The <i>formatstring</i> must be a
138format string in the same format as for the <i>printf</i>
139command or the <i>printf()</i> function, taking either no
140argument or exactly one unsigned integer argument.</p>
141
142<p style="margin-left:11%; margin-top: 1em">Options
143controlling 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,
147error messages about invalid or unconvertible characters are
148omitted, 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
152lists the names of the supported encodings, in a system
153dependent format. For the libiconv implementation, the names
154are printed in upper case, separated by whitespace, and
155alias names of an encoding are listed on the same line as
156the 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
167West-European encoding ISO&minus;8859&minus;1 to
168Unicode.</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
177Russian encoding KOI8&minus;R to the locale encoding,
178substituting an angle bracket notation with hexadecimal
179numbers for invalid bytes and for valid but unconvertible
180characters.</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
186encodings.</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>
Note: See TracBrowser for help on using the repository browser.