xref: /netbsd-src/usr.bin/iconv/iconv.1 (revision 24964ef3d11b555576053f86ce2a2efa7e2cd5dd)
1.\" $NetBSD: iconv.1,v 1.5 2013/05/12 12:25:12 rodent Exp $
2.\"
3.\" Copyright (c)2003 Citrus Project,
4.\" All rights reserved.
5.\"
6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions
8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright
10.\"    notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\"    notice, this list of conditions and the following disclaimer in the
13.\"    documentation and/or other materials provided with the distribution.
14.\"
15.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
16.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25.\" SUCH DAMAGE.
26.\"
27.Dd March 20, 2008
28.Dt ICONV 1
29.Os
30.\" ----------------------------------------------------------------------
31.Sh NAME
32.Nm iconv
33.Nd codeset conversion utility
34.\" ----------------------------------------------------------------------
35.Sh SYNOPSIS
36.Nm
37.Op Fl cs
38.Fl f
39.Ar from_name
40.Fl t
41.Ar to_name
42.Op Ar file ...
43.Nm
44.Fl f
45.Ar from_name
46.Op Fl cs
47.Op Fl t Ar to_name
48.Op Ar file ...
49.Nm
50.Fl t
51.Ar to_name
52.Op Fl cs
53.Op Fl f Ar from_name
54.Op Ar file ...
55.Nm
56.Fl l
57.\" ----------------------------------------------------------------------
58.Sh DESCRIPTION
59The
60.Nm
61utility converts the codeset of
62.Ar file
63(or from standard input if no file is specified) from codeset
64.Ar from_name
65to codeset
66.Ar to_name
67and outputs the
68converted text on standard output.
69.Pp
70The following options are available:
71.Bl -tag -width 0123
72.It Fl c
73Prevent output of any invalid characters.
74By default,
75.Nm
76outputs an
77.Dq invalid character
78specified by the
79.Ar to_name
80codeset when it encounters a character which is valid in the
81.Ar from_name
82codeset but does not have a corresponding character in the
83.Ar to_name
84codeset.
85.It Fl f
86Specifies the source codeset name as
87.Ar from_name .
88.It Fl l
89Lists available codeset names.
90Note that not all combinations of
91.Ar from_name
92and
93.Ar to_name
94are valid.
95.It Fl s
96Silent.
97By default,
98.Nm
99outputs the number of
100.Dq invalid characters
101to standard error if they exist.
102This option prevents this behaviour.
103.It Fl t
104Specifies the destination codeset name as
105.Ar to_name .
106.El
107.\" ----------------------------------------------------------------------
108.Sh EXIT STATUS
109.Ex -std iconv
110.\" ----------------------------------------------------------------------
111.Sh SEE ALSO
112.Xr iconv 3
113.\" ----------------------------------------------------------------------
114.Sh STANDARDS
115.Nm
116conforms to
117.St -p1003.1-2001 .
118.\" ----------------------------------------------------------------------
119.Sh HISTORY
120.Nm
121first appeared in
122.Nx 2.0 .
123