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