iconv.1.html 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334
  1. <!-- Creator : groff version 1.18.1 -->
  2. <!-- CreationDate: Tue Jun 30 22:52:08 2009 -->
  3. <html>
  4. <head>
  5. <meta name="generator" content="groff -Thtml, see www.gnu.org">
  6. <meta name="Content-Style" content="text/css">
  7. <title>ICONV</title>
  8. </head>
  9. <body>
  10. <h1 align=center>ICONV</h1>
  11. <a href="#NAME">NAME</a><br>
  12. <a href="#SYNOPSIS">SYNOPSIS</a><br>
  13. <a href="#DESCRIPTION">DESCRIPTION</a><br>
  14. <a href="#EXAMPLES">EXAMPLES</a><br>
  15. <a href="#CONFORMING TO">CONFORMING TO</a><br>
  16. <a href="#SEE ALSO">SEE ALSO</a><br>
  17. <hr>
  18. <a name="NAME"></a>
  19. <h2>NAME</h2>
  20. <!-- INDENTATION -->
  21. <table width="100%" border=0 rules="none" frame="void"
  22. cols="2" cellspacing="0" cellpadding="0">
  23. <tr valign="top" align="left">
  24. <td width="10%"></td>
  25. <td width="89%">
  26. <p>iconv &minus; character set conversion</p>
  27. </td>
  28. </table>
  29. <a name="SYNOPSIS"></a>
  30. <h2>SYNOPSIS</h2>
  31. <!-- INDENTATION -->
  32. <table width="100%" border=0 rules="none" frame="void"
  33. cols="2" cellspacing="0" cellpadding="0">
  34. <tr valign="top" align="left">
  35. <td width="10%"></td>
  36. <td width="89%">
  37. <pre>iconv [<i>OPTION</i>...] [<b>&minus;f</b> <i>encoding</i>] [<b>&minus;t</b> <i>encoding</i>] [<i>inputfile</i> ...]
  38. iconv <b>&minus;l
  39. </b></pre>
  40. </td>
  41. </table>
  42. <a name="DESCRIPTION"></a>
  43. <h2>DESCRIPTION</h2>
  44. <!-- INDENTATION -->
  45. <table width="100%" border=0 rules="none" frame="void"
  46. cols="2" cellspacing="0" cellpadding="0">
  47. <tr valign="top" align="left">
  48. <td width="10%"></td>
  49. <td width="89%">
  50. <p>The <b>iconv</b> program converts text from one encoding
  51. to another encoding. More precisely, it converts <b>from</b>
  52. the encoding given for the <b>&minus;f</b> option <b>to</b>
  53. the encoding given for the <b>&minus;t</b> option. Either of
  54. these encodings defaults to the encoding of the current
  55. locale. All the <i>inputfile</i>s are read and converted in
  56. turn; if no <i>inputfile</i> is given, the standard input is
  57. used. The converted text is printed to standard output.</p>
  58. <!-- INDENTATION -->
  59. <p>The encodings permitted are system dependent. For the
  60. libiconv implementation, they are listed in the
  61. iconv_open(3) manual page.</p>
  62. <!-- INDENTATION -->
  63. <p>Options controlling the input and output format:</p>
  64. </td>
  65. </table>
  66. <!-- INDENTATION -->
  67. <table width="100%" border=0 rules="none" frame="void"
  68. cols="2" cellspacing="0" cellpadding="0">
  69. <tr valign="top" align="left">
  70. <td width="10%"></td>
  71. <td width="89%">
  72. <p><b>&minus;f</b> <i>encoding</i>,
  73. <b>&minus;&minus;from&minus;code=</b><i>encoding</i></p></td>
  74. </table>
  75. <!-- INDENTATION -->
  76. <table width="100%" border=0 rules="none" frame="void"
  77. cols="2" cellspacing="0" cellpadding="0">
  78. <tr valign="top" align="left">
  79. <td width="21%"></td>
  80. <td width="77%">
  81. <p>Specifies the encoding of the input.</p>
  82. </td>
  83. </table>
  84. <!-- INDENTATION -->
  85. <table width="100%" border=0 rules="none" frame="void"
  86. cols="2" cellspacing="0" cellpadding="0">
  87. <tr valign="top" align="left">
  88. <td width="10%"></td>
  89. <td width="89%">
  90. <p><b>&minus;t</b> <i>encoding</i>,
  91. <b>&minus;&minus;to&minus;code=</b><i>encoding</i></p></td>
  92. </table>
  93. <!-- INDENTATION -->
  94. <table width="100%" border=0 rules="none" frame="void"
  95. cols="2" cellspacing="0" cellpadding="0">
  96. <tr valign="top" align="left">
  97. <td width="21%"></td>
  98. <td width="77%">
  99. <p>Specifies the encoding of the output.</p>
  100. </td>
  101. </table>
  102. <!-- INDENTATION -->
  103. <table width="100%" border=0 rules="none" frame="void"
  104. cols="2" cellspacing="0" cellpadding="0">
  105. <tr valign="top" align="left">
  106. <td width="10%"></td>
  107. <td width="89%">
  108. <p>Options controlling conversion problems:</p>
  109. </td>
  110. </table>
  111. <!-- TABS -->
  112. <table width="100%" border=0 rules="none" frame="void"
  113. cols="4" cellspacing="0" cellpadding="0">
  114. <tr valign="top" align="left">
  115. <td width="13%"></td>
  116. <td width="2%">
  117. <p><b>&minus;c</b></p>
  118. </td>
  119. <td width="5%"></td>
  120. <td width="77%">
  121. <p>When this option is given, characters that cannot be
  122. converted are silently discarded, instead of leading to a
  123. conversion error.</p>
  124. </td>
  125. </table>
  126. <!-- INDENTATION -->
  127. <table width="100%" border=0 rules="none" frame="void"
  128. cols="2" cellspacing="0" cellpadding="0">
  129. <tr valign="top" align="left">
  130. <td width="10%"></td>
  131. <td width="89%">
  132. <p><b>&minus;&minus;unicode&minus;subst=</b><i>formatstring</i></p></td>
  133. </table>
  134. <!-- INDENTATION -->
  135. <table width="100%" border=0 rules="none" frame="void"
  136. cols="2" cellspacing="0" cellpadding="0">
  137. <tr valign="top" align="left">
  138. <td width="21%"></td>
  139. <td width="77%">
  140. <p>When this option is given, Unicode characters that cannot
  141. be represented in the target encoding are replaced with a
  142. placeholder string that is constructed from the given
  143. <i>formatstring</i>, applied to the Unicode code point. The
  144. <i>formatstring</i> must be a format string in the same
  145. format as for the <i>printf</i> command or the
  146. <i>printf()</i> function, taking either no argument or
  147. exactly one unsigned integer argument.</p>
  148. </td>
  149. </table>
  150. <!-- INDENTATION -->
  151. <table width="100%" border=0 rules="none" frame="void"
  152. cols="2" cellspacing="0" cellpadding="0">
  153. <tr valign="top" align="left">
  154. <td width="10%"></td>
  155. <td width="89%">
  156. <p><b>&minus;&minus;byte&minus;subst=</b><i>formatstring</i></p></td>
  157. </table>
  158. <!-- INDENTATION -->
  159. <table width="100%" border=0 rules="none" frame="void"
  160. cols="2" cellspacing="0" cellpadding="0">
  161. <tr valign="top" align="left">
  162. <td width="21%"></td>
  163. <td width="77%">
  164. <p>When this option is given, bytes in the input that are
  165. not valid in the source encoding are replaced with a
  166. placeholder string that is constructed from the given
  167. <i>formatstring</i>, applied to the byte&rsquo;s value. The
  168. <i>formatstring</i> must be a format string in the same
  169. format as for the <i>printf</i> command or the
  170. <i>printf()</i> function, taking either no argument or
  171. exactly one unsigned integer argument.</p>
  172. </td>
  173. </table>
  174. <!-- INDENTATION -->
  175. <table width="100%" border=0 rules="none" frame="void"
  176. cols="2" cellspacing="0" cellpadding="0">
  177. <tr valign="top" align="left">
  178. <td width="10%"></td>
  179. <td width="89%">
  180. <p><b>&minus;&minus;widechar&minus;subst=</b><i>formatstring</i></p></td>
  181. </table>
  182. <!-- INDENTATION -->
  183. <table width="100%" border=0 rules="none" frame="void"
  184. cols="2" cellspacing="0" cellpadding="0">
  185. <tr valign="top" align="left">
  186. <td width="21%"></td>
  187. <td width="77%">
  188. <p>When this option is given, wide characters in the input
  189. that are not valid in the source encoding are replaced with
  190. a placeholder string that is constructed from the given
  191. <i>formatstring</i>, applied to the byte&rsquo;s value. The
  192. <i>formatstring</i> must be a format string in the same
  193. format as for the <i>printf</i> command or the
  194. <i>printf()</i> function, taking either no argument or
  195. exactly one unsigned integer argument.</p>
  196. </td>
  197. </table>
  198. <!-- INDENTATION -->
  199. <table width="100%" border=0 rules="none" frame="void"
  200. cols="2" cellspacing="0" cellpadding="0">
  201. <tr valign="top" align="left">
  202. <td width="10%"></td>
  203. <td width="89%">
  204. <p>Options controlling error output:</p>
  205. </td>
  206. </table>
  207. <!-- INDENTATION -->
  208. <table width="100%" border=0 rules="none" frame="void"
  209. cols="2" cellspacing="0" cellpadding="0">
  210. <tr valign="top" align="left">
  211. <td width="10%"></td>
  212. <td width="89%">
  213. <p><b>&minus;s</b>, <b>&minus;&minus;silent</b></p></td>
  214. </table>
  215. <!-- INDENTATION -->
  216. <table width="100%" border=0 rules="none" frame="void"
  217. cols="2" cellspacing="0" cellpadding="0">
  218. <tr valign="top" align="left">
  219. <td width="21%"></td>
  220. <td width="77%">
  221. <p>When this option is given, error messages about invalid
  222. or unconvertible characters are omitted, but the actual
  223. converted text is unaffected.</p>
  224. </td>
  225. </table>
  226. <!-- INDENTATION -->
  227. <table width="100%" border=0 rules="none" frame="void"
  228. cols="2" cellspacing="0" cellpadding="0">
  229. <tr valign="top" align="left">
  230. <td width="10%"></td>
  231. <td width="89%">
  232. <p>The <b>iconv &minus;l</b> or <b>iconv
  233. &minus;&minus;list</b> command lists the names of the
  234. supported encodings, in a system dependent format. For the
  235. libiconv implementation, the names are printed in upper
  236. case, separated by whitespace, and alias names of an
  237. encoding are listed on the same line as the encoding
  238. itself.</p>
  239. </td>
  240. </table>
  241. <a name="EXAMPLES"></a>
  242. <h2>EXAMPLES</h2>
  243. <!-- INDENTATION -->
  244. <table width="100%" border=0 rules="none" frame="void"
  245. cols="2" cellspacing="0" cellpadding="0">
  246. <tr valign="top" align="left">
  247. <td width="10%"></td>
  248. <td width="89%">
  249. <p><b>iconv &minus;f ISO&minus;8859&minus;1 &minus;t
  250. UTF&minus;8</b></p></td>
  251. </table>
  252. <!-- INDENTATION -->
  253. <table width="100%" border=0 rules="none" frame="void"
  254. cols="2" cellspacing="0" cellpadding="0">
  255. <tr valign="top" align="left">
  256. <td width="21%"></td>
  257. <td width="77%">
  258. <p>converts input from the old West-European encoding
  259. ISO&minus;8859&minus;1 to Unicode.</p>
  260. </td>
  261. </table>
  262. <!-- INDENTATION -->
  263. <table width="100%" border=0 rules="none" frame="void"
  264. cols="2" cellspacing="0" cellpadding="0">
  265. <tr valign="top" align="left">
  266. <td width="10%"></td>
  267. <td width="89%">
  268. <pre><b>iconv &minus;f KOI8&minus;R &minus;&minus;byte&minus;subst=&quot;&lt;0x%x&gt;&quot;
  269. &minus;&minus;unicode&minus;subst=&quot;&lt;U+%04X&gt;&quot;
  270. </b></pre>
  271. </td>
  272. </table>
  273. <!-- INDENTATION -->
  274. <table width="100%" border=0 rules="none" frame="void"
  275. cols="2" cellspacing="0" cellpadding="0">
  276. <tr valign="top" align="left">
  277. <td width="20%"></td>
  278. <td width="79%">
  279. <p>converts input from the old Russian encoding KOI8&minus;R
  280. to the locale encoding, substituting an angle bracket
  281. notation with hexadecimal numbers for invalid bytes and for
  282. valid but unconvertible characters.</p></td>
  283. </table>
  284. <!-- INDENTATION -->
  285. <table width="100%" border=0 rules="none" frame="void"
  286. cols="2" cellspacing="0" cellpadding="0">
  287. <tr valign="top" align="left">
  288. <td width="10%"></td>
  289. <td width="89%">
  290. <p><b>iconv &minus;&minus;list</b></p></td>
  291. </table>
  292. <!-- INDENTATION -->
  293. <table width="100%" border=0 rules="none" frame="void"
  294. cols="2" cellspacing="0" cellpadding="0">
  295. <tr valign="top" align="left">
  296. <td width="21%"></td>
  297. <td width="77%">
  298. <p>lists the supported encodings.</p>
  299. </td>
  300. </table>
  301. <a name="CONFORMING TO"></a>
  302. <h2>CONFORMING TO</h2>
  303. <!-- INDENTATION -->
  304. <table width="100%" border=0 rules="none" frame="void"
  305. cols="2" cellspacing="0" cellpadding="0">
  306. <tr valign="top" align="left">
  307. <td width="10%"></td>
  308. <td width="89%">
  309. <p>POSIX:2001</p>
  310. </td>
  311. </table>
  312. <a name="SEE ALSO"></a>
  313. <h2>SEE ALSO</h2>
  314. <!-- INDENTATION -->
  315. <table width="100%" border=0 rules="none" frame="void"
  316. cols="2" cellspacing="0" cellpadding="0">
  317. <tr valign="top" align="left">
  318. <td width="10%"></td>
  319. <td width="89%">
  320. <p><b>iconv_open</b>(3), <b>locale</b>(7)</p>
  321. </td>
  322. </table>
  323. <hr>
  324. </body>
  325. </html>