iconv.1: Minor tweaks to Marko Myllynen's patch

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2014-06-11 12:05:09 +02:00
parent 111cf06c08
commit 3b1d2abe12
1 changed files with 27 additions and 25 deletions

View File

@ -39,10 +39,10 @@ program reads in text in one encoding and outputs the text in another
encoding.
If no input files are given, or if it is given as a dash (\-),
.B iconv
reads from the standard input.
reads from standard input.
If no output file is given,
.B iconv
writes to the standard output.
writes to standard output.
.PP
If no
.I from-encoding
@ -65,20 +65,20 @@ Use
.I to-encoding
for output characters.
If
.I to-encoding
is appended with
.BR //IGNORE ,
If the string
.BR //IGNORE
is appended to
.IR to-encoding ,
characters that cannot be converted are discarded and an error is
printed after conversion.
If
.I to-encoding
is appended with
.BR //TRANSLIT ,
If the string
.BR //TRANSLIT
is appended to
.IR to-encoding ,
characters being converted are transliterated when needed and possible.
This means that when a character cannot be represented in the target
character set, it can be approximated through one or several similarly
This means that when a character cannot be represented in the target
character set, it can be approximated through one or several similar
looking characters.
Characters that are outside of the target character set and cannot be
transliterated are replaced with a question mark (?) in the output.
@ -88,7 +88,7 @@ List all known character set encodings.
.TP
.B "\-c"
Silently discard characters that cannot be converted instead of
terminating when encountering such a character.
terminating when encountering such characters.
.TP
.BI \-o " outputfile" ", \-\-output=" outputfile
Use
@ -96,7 +96,7 @@ Use
for output.
.TP
.B "\-s, \-\-silent"
This option is ignored, it is provided only for compatibility.
This option is ignored; it is provided only for compatibility.
.TP
.B "\-\-verbose"
Print progress information on standard error when processing
@ -123,13 +123,13 @@ function which in turn uses
modules to convert to and from a character set.
.B iconv
supports any character set for which a
corresponding gconv configuration and module are provided for.
By default, the system provided gconv configuration and modules
corresponding gconv configuration and module are provided.
By default, the system-provided gconv configuration and modules
are used, but
.B GCONV_PATH
can be defined as a list of pathnames, separated by colons (\(aq:\(aq),
for gconv configuration and module search path,
to be searched prior to the system provided configuration and modules.
to be searched prior to the system-provided configuration and modules.
If
.B GCONV_PATH
is set, the system gconv module configuration cache (created by
@ -151,21 +151,23 @@ Usual default gconv module configuration cache.
.SH CONFORMING TO
POSIX.1-2001.
.SH EXAMPLE
Convert text from the ISO 8859-15 character encoding to UTF-8
encoding:
.PP
.RS
iconv \-f ISO\-8859\-15 -t UTF\-8 < input.txt > output.txt
.RE
Convert text from the ISO 8859-15 character encoding to UTF-8:
.in +4n
.nf
$ \fBiconv \-f ISO\-8859\-15 -t UTF\-8 < input.txt > output.txt\fP
.fi
.in
.PP
The next example converts from UTF-8 to ASCII, transliterating when
possible:
.in +4n
.nf
$ \fBecho abc ß α € àḃç | iconv -f UTF-8 -t ASCII//TRANSLIT\fP
$ \fBecho abc ß α € àḃç | iconv \-f UTF\-8 \-t ASCII//TRANSLIT\fP
abc ss ? EUR abc
$
.fi
.in
.SH "SEE ALSO"
.BR locale (1),
.BR iconv (3),