80a078464a008e937b4691b02838989cc7412250
[yaz-moved-to-github.git] / doc / yaz-iconv-man.xml
1 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN"
2  "http://www.oasis-open.org/docbook/xml/4.1/docbookx.dtd"
3 [
4      <!ENTITY % local SYSTEM "local.ent">
5      %local;
6      <!ENTITY % entities SYSTEM "entities.ent">
7      %entities;
8      <!ENTITY % idcommon SYSTEM "common/common.ent">
9      %idcommon;
10 ]>
11 <refentry id="yaz-iconv">
12  <refentryinfo>
13   <productname>YAZ</productname>
14   <productnumber>&version;</productnumber>
15  </refentryinfo>
16  
17  <refmeta>
18   <refentrytitle>yaz-iconv</refentrytitle>
19   <manvolnum>1</manvolnum>
20  </refmeta>
21  
22  <refnamediv>
23   <refname>yaz-iconv</refname>
24   <refpurpose>YAZ Charcter set conversion utility</refpurpose>
25  </refnamediv>
26  
27  <refsynopsisdiv>
28   <cmdsynopsis>
29    <command>yaz-iconv</command>
30    <arg choice="opt"><option>-f <replaceable>from</replaceable></option></arg>
31    <arg choice="opt"><option>-t <replaceable>to</replaceable></option></arg>
32    <arg choice="opt"><option>-v</option></arg>
33    <arg choice="opt" rep="repeat">file</arg>
34   </cmdsynopsis>
35  </refsynopsisdiv>
36  
37  <refsect1><title>DESCRIPTION</title>
38   <para>
39    <command>yaz-iconv</command> converts data in file in character
40    set specified by <replaceable>from</replaceable> to output in
41    character set as specified by <replaceable>to</replaceable>.
42   </para>
43   <para>
44    This <command>yaz-iconv</command> utility similar to the
45    <command>iconv</command> found on many POSIX systems (Glibc, Solaris, etc).
46   </para>
47   <para>
48    If no <replaceable>file</replaceable> is specified,
49    <command>yaz-iconv</command> reads from standard input.
50   </para>
51  </refsect1>
52  
53  <refsect1><title>OPTIONS</title>
54   
55   <variablelist>
56    <varlistentry>
57     <term>-f<replaceable>from</replaceable>]</term>
58     <listitem><para>
59       Specify the character set <replaceable>from</replaceable>
60       of the input file.
61       Should be used in conjunction with option <literal>-t</literal>.
62      </para></listitem>
63    </varlistentry>
64
65    <varlistentry>
66     <term>-t<replaceable>to</replaceable>]</term>
67     <listitem><para>
68       Specify the character set <replaceable>of</replaceable>
69       of the output.
70       Should be used in conjunction with option <literal>-f</literal>.
71      </para></listitem>
72    </varlistentry>
73
74    <varlistentry>
75     <term>-v</term>
76     <listitem><para>
77       Print more information about the conversion process.
78      </para></listitem>
79    </varlistentry>
80
81   </variablelist>
82  </refsect1>
83  
84  <refsect1><title>ENCODINGS</title>
85   <para>
86    The yaz-iconv command and the API as defined in
87    <filename>yaz/yaz-iconv.h</filename> is a wrapper for the
88    library system call iconv. But YAZ' iconv utility also implements
89    conversions on its own. The table below lists characters sets (or encodings).
90    that are supported by YAZ. Each character set is marked with either
91    <emphasis>encode</emphasis> or <emphasis>decode</emphasis>. If
92    an encoding is encode-enabled YAZ may convert <emphasis>to</emphasis>
93    to the designated encoding. If an encoding is decode-enabled, YAZ
94    may convert <emphasis>from</emphasis> the designated encoding.
95   </para>
96   <variablelist>
97    <varlistentry>
98     <term>marc8 (encode, decode)</term>
99     <listitem>
100      <para>
101       The <ulink url="&url.marc8;">MARC8</ulink> encoding as defined by
102       the Library of Congress. Most MARC21/USMARC records usees
103       this encoding.
104      </para>
105     </listitem>
106    </varlistentry>
107    <varlistentry>
108     <term>marc8s (encode, decode)</term>
109     <listitem>
110      <para>
111       Like MARC8 but with conversion prefers non-combined characters
112       in the Latin-1 plane over combined characters.
113      </para>
114     </listitem>
115    </varlistentry>
116    <varlistentry>
117     <term>marc8lossy (encode)</term>
118     <listitem>
119      <para>
120       Lossy encoding of MARC-8.
121      </para>
122     </listitem>
123    </varlistentry>
124    <varlistentry>
125     <term>marc8lossless (encode)</term>
126     <listitem>
127      <para>
128       Lossless encoding of MARC8.
129      </para>
130     </listitem>
131    </varlistentry>
132    <varlistentry>
133     <term>utf8 (encode, decode)</term>
134     <listitem>
135      <para>
136       The most commonly used UNICODE encoding on the Internet.
137      </para>
138     </listitem>
139    </varlistentry>
140    <varlistentry>
141     <term>iso8859-1 (encode, decode)</term>
142     <listitem>
143      <para>
144       ISO-8859-1, AKA Latin-1.
145      </para>
146     </listitem>
147    </varlistentry>
148    <varlistentry>
149     <term>iso5426 (decode)</term>
150     <listitem>
151      <para>
152       ISO 5426. Some MARC records (UNIMARC) uses this encoding.
153      </para>
154     </listitem>
155    </varlistentry>
156    <varlistentry>
157     <term>iso5428:1984 (encode, decode)</term>
158     <listitem>
159      <para>
160       ISO 5428:1984.
161      </para>
162     </listitem>
163    </varlistentry>
164    <varlistentry>
165     <term>advancegreek (encode, decode)</term>
166     <listitem>
167      <para>
168       An encoding for Greek used by some vendors (Advance).
169      </para>
170     </listitem>
171    </varlistentry>
172   </variablelist>
173  </refsect1>
174
175  <refsect1><title>EXAMPLES</title>
176   <para>
177    The following command converts from ISO-8859-1 (Latin-1) to
178    UTF-8.
179    <screen>
180     yaz-iconv -f ISO-8859-1 -t UTF-8 -X &lt;input.lst &gt;output.lst
181    </screen>
182   </para>
183  </refsect1> 
184
185  <refsect1><title>FILES</title>
186   <para>
187    <filename><replaceable>prefix</replaceable>/bin/yaz-iconv</filename>
188   </para>
189   <para>
190    <filename><replaceable>prefix</replaceable>/include/yaz/yaz-iconv.h</filename>
191   </para>
192  </refsect1>
193  <refsect1><title>SEE ALSO</title>
194   <para>
195    yaz(7)
196    iconv(1)
197   </para>
198  </refsect1>
199 </refentry>
200
201 <!-- Keep this comment at the end of the file
202 Local variables:
203 mode: sgml
204 sgml-omittag:t
205 sgml-shorttag:t
206 sgml-minimize-attributes:nil
207 sgml-always-quote-attributes:t
208 sgml-indent-step:1
209 sgml-indent-data:t
210 sgml-parent-document:nil
211 sgml-local-catalogs: nil
212 sgml-namecase-general:t
213 End:
214 -->