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