iconv.1: New page for iconv(1)
PATCH 1/1 iconv.1: New page for iconv(1)
Hi,
while updating the locale pages I noticed there was no iconv(1) page in upstream so I wrote one, please see below.
From 006b3e251ae3883b3652bfb3f32a8d72ba803960 Mon Sep 17 00:00:00 2001
From: Marko Myllynen <[email protected]>
Date: Mon, 9 Jun 2014 08:09:57 +0300
Subject: [PATCH] iconv.1: New page for iconv(1)
--- man1/iconv.1 | 156 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 156 insertions(+), 0 deletions(-) create mode 100644 man1/iconv.1
man1/iconv.1 new file +156 -0
@@ -0,0 +1,156 @@ +'\" t -*- coding: UTF-8 -*- +.\" +.\" Copyright (C) 2014 Marko Myllynen <[email protected]> +.\" +.\" %%%LICENSE_START(GPLv2+_DOC_FULL) +.\" This is free documentation; you can redistribute it and/or +.\" modify it under the terms of the GNU General Public License as +.\" published by the Free Software Foundation; either version 2 of +.\" the License, or (at your option) any later version. +.\" +.\" The GNU General Public License's references to "object code" +.\" and "executables" are to be interpreted as the output of any +.\" document formatting or typesetting system, including +.\" intermediate and printed output. +.\" +.\" This manual is distributed in the hope that it will be useful, +.\" but WITHOUT ANY WARRANTY; without even the implied warranty of +.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +.\" GNU General Public License for more details. +.\" +.\" You should have received a copy of the GNU General Public +.\" License along with this manual; if not, see +.\" <http://www.gnu.org/licenses/>. +.\" %%%LICENSE_END +.\" +.TH ICONV 1 2014-06-06 "GNU" "Linux User Manual" +.SH NAME +iconv \- convert text from one character encoding to another +.SH SYNOPSIS +.B iconv +.RI [ options ] +.RI "[-f " from-encoding "]" +.RI "[-t " to-encoding "]" +.RI [ inputfile ]... +.SH DESCRIPTION +The +.B iconv +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. If no output file is given, +.B iconv +writes to the standard output. +.PP +If no +.I from-encoding +is given, the default is derived from the current locale. +If no +.I to-encoding +is given, the default is derived from the current locale. +.SH OPTIONS +.TP +.BI \-f " from-encoding" ", \-\-from-code=" from-encoding +Use +.I from-encoding +for input characters. +.TP +.BI \-t " to-encoding" ", \-\-to-code=" to-encoding +Use +.I to-encoding +for output characters. + +If +.I to-encoding +is appended with +.BR //IGNORE , +characters that cannot be converted are discarded and an error is +printed after conversion. + +If +.I to-encoding +is appended with +.BR //TRANSLIT , +characters being converted are transliterated when needed and possible. +Characters that are outside of the target character set and cannot be +transliterated are replaced with the question mark (?) in the output. +.TP +.B "\-l, \-\-list" +List all known character set encodings. +.TP +.B "\-c" +Silently discard characters that cannot be converted instead of +aborting on them. +.TP +.BI \-o " outputfile" ", \-\-output=" outputfile +Use +.I outputfile +for output. +.TP +.B "\-s, \-\-silent" +This option is ignored, it is provided only for compatibility. +.TP +.B "\-\-verbose" +Print progress information on the standard error when processing +multiple files. +.TP +.B "\-\-help" +Print a usage summary and exit. +.TP +.B "\-\-usage" +Print a short usage summary and exit. +.TP +.B "\-V, \-\-version" +Print the version number, license, and disclaimer of warranty for +.BR iconv . +.SH EXIT STATUS +Zero on success, non-zero on errors. +.SH ENVIRONMENT +The +.B iconv +program supports any character set for which a +corresponding gconv configuration and module are provided for. +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. +If +.B GCONV_PATH +is set, the system gconv module configuration cache (created by +.BR iconvconfig (8)) +will not be used. Only directories containing the +.I gconv-modules +configuration files will be looked for the specified gconv modules. +.SH FILES +.TP +.I /usr/lib/gconv +Usual default gconv module path. +.TP +.I /usr/lib/gconv/gconv-modules +Usual default gconv module configuration. +.TP +.I /usr/lib/gconv/gconv-modules.cache +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 +.PP +The next example converts from UTF-8 to ASCII, transliterating when +possible, resulting "abc ss ? EUR abc" printed (without quotes) to the +standard output: +.PP +.RS +echo abc ß α € àḃç | iconv \-f UTF\-8 \-t ASCII//TRANSLIT +.RE +.SH "SEE ALSO" +.BR locale (1), +.BR charsets (7), +.BR iconvconfig (8)
Signature · 10 lines
1.7.1 Thanks, -- Marko Myllynen -- To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): [email protected]
Hi Marko,
Quoted 4 lines · Marko Myllynen
Hi,
while updating the locale pages I noticed there was no iconv(1) page in upstream so I wrote one, please see below.
Thanks for doing this. Could I ask you to look at the comments below, and send a revised version, please.
Quoted 45 lines
Quoted 1 line
From
006b3e251ae3883b3652bfb3f32a8d72ba803960Mon Sep 17 00:00:00 2001From: Marko Myllynen <[email protected]>
Date: Mon, 9 Jun 2014 08:09:57 +0300
Subject: [PATCH] iconv.1: New page for iconv(1)--- man1/iconv.1 | 156 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 156 insertions(+), 0 deletions(-) create mode 100644 man1/iconv.1man1/iconv.1 new file +29
-0@@ -0,0 +1,156 @@ +'\" t -*- coding: UTF-8 -*- +.\" +.\" Copyright (C) 2014 Marko Myllynen <[email protected]> +.\" +.\" %%%LICENSE_START(GPLv2+_DOC_FULL) +.\" This is free documentation; you can redistribute it and/or +.\" modify it under the terms of the GNU General Public License as +.\" published by the Free Software Foundation; either version 2 of +.\" the License, or (at your option) any later version. +.\" +.\" The GNU General Public License's references to "object code" +.\" and "executables" are to be interpreted as the output of any +.\" document formatting or typesetting system, including +.\" intermediate and printed output. +.\" +.\" This manual is distributed in the hope that it will be useful, +.\" but WITHOUT ANY WARRANTY; without even the implied warranty of +.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +.\" GNU General Public License for more details. +.\" +.\" You should have received a copy of the GNU General Public +.\" License along with this manual; if not, see +.\" <http://www.gnu.org/licenses/>. +.\" %%%LICENSE_END +.\" +.TH ICONV 1 2014-06-06 "GNU" "Linux User Manual" +.SH NAME +iconv \- convert text from one character encoding to another +.SH SYNOPSIS
man1/iconv.1 line 39
Quoted 10 lines
man1/iconv.1 new file +10
-0+.B iconv +.RI [ options ] +.RI "[-f " from-encoding "]" +.RI "[-t " to-encoding "]" +.RI [ inputfile ]... +.SH DESCRIPTION +The +.B iconv +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 (\-),
^
Please always start new sentences on new source lines.
man1/iconv.1 line 41
Quoted 2 lines
man1/iconv.1 new file +2
-0+.B iconv +reads from the standard input. If no output file is given,
^
man1/iconv.1 line 50
Quoted 9 lines
man1/iconv.1 new file +9
-0+.B iconv +writes to the standard output. +.PP +If no +.I from-encoding +is given, the default is derived from the current locale. +If no +.I to-encoding +is given, the default is derived from the current locale.
Maybe some more precision here is warranted? How is the default derived?
Quoted 16 lines
man1/iconv.1 new file +16
-0+.SH OPTIONS +.TP +.BI \-f " from-encoding" ", \-\-from-code=" from-encoding +Use +.I from-encoding +for input characters. +.TP +.BI \-t " to-encoding" ", \-\-to-code=" to-encoding +Use +.I to-encoding +for output characters. + +If +.I to-encoding +is appended with +.BR //IGNORE ,
man1/iconv.1 line 76
Quoted 10 lines
man1/iconv.1 new file +10
-0+characters that cannot be converted are discarded and an error is +printed after conversion. + +If +.I to-encoding +is appended with +.BR //TRANSLIT , +characters being converted are transliterated when needed and possible. +Characters that are outside of the target character set and cannot be +transliterated are replaced with the question mark (?) in the output.
s/the/a/
man1/iconv.1 line 83
Quoted 7 lines
man1/iconv.1 new file +7
-0+.TP +.B "\-l, \-\-list" +List all known character set encodings. +.TP +.B "\-c" +Silently discard characters that cannot be converted instead of +aborting on them.
What does "aborting on them" mean? Does the program terminate?
man1/iconv.1 line 94
Quoted 11 lines
man1/iconv.1 new file +11
-0+.TP +.BI \-o " outputfile" ", \-\-output=" outputfile +Use +.I outputfile +for output. +.TP +.B "\-s, \-\-silent" +This option is ignored, it is provided only for compatibility. +.TP +.B "\-\-verbose" +Print progress information on the standard error when processing
s/the//
Quoted 8 lines
man1/iconv.1 new file +8
-0+multiple files. +.TP +.B "\-\-help" +Print a usage summary and exit. +.TP +.B "\-\-usage" +Print a short usage summary and exit. +.TP
man1/iconv.1 line 112
Quoted 10 lines
man1/iconv.1 new file +10
-0+.B "\-V, \-\-version" +Print the version number, license, and disclaimer of warranty for +.BR iconv . +.SH EXIT STATUS +Zero on success, non-zero on errors. +.SH ENVIRONMENT +The +.B iconv +program supports any character set for which a +corresponding gconv configuration and module are provided for.
I think a sentence to explain "gconv configuration" is in order. The reader otherwise is a bit lost at this point.
man1/iconv.1 line 113
Quoted 1 line
man1/iconv.1 new file +1
-0+By default the system provided gconv configuration and modules
s/default/default,/
man1/iconv.1 line 114
Quoted 1 line
man1/iconv.1 new file +1
-0+are used but
s/used/used,/
man1/iconv.1 line 123
Quoted 9 lines
man1/iconv.1 new file +9
-0+.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. +If +.B GCONV_PATH +is set, the system gconv module configuration cache (created by +.BR iconvconfig (8)) +will not be used. Only directories containing the
^
man1/iconv.1 line 125
Quoted 2 lines
man1/iconv.1 new file +2
-0+.I gconv-modules +configuration files will be looked for the specified gconv modules.
s/looked/searched/
Quoted 13 lines
man1/iconv.1 new file +13
-0+.SH FILES +.TP +.I /usr/lib/gconv +Usual default gconv module path. +.TP +.I /usr/lib/gconv/gconv-modules +Usual default gconv module configuration. +.TP +.I /usr/lib/gconv/gconv-modules.cache +Usual default gconv module configuration cache. +.SH CONFORMING TO +POSIX.1-2001. +.SH EXAMPLE
man1/iconv.1 line 148
Quoted 10 lines
man1/iconv.1 new file +10
-0+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 +.PP +The next example converts from UTF-8 to ASCII, transliterating when +possible, resulting "abc ss ? EUR abc" printed (without quotes) to the +standard output:
Here, rather than explaining what the output would be, simply show a shell session with command and the output.
Cheers,
Michael
Quoted 9 lines
man1/iconv.1 new file +8
-0+.PP +.RS +echo abc ß α € àḃç | iconv \-f UTF\-8 \-t ASCII//TRANSLIT +.RE +.SH "SEE ALSO" +.BR locale (1), +.BR charsets (7), +.BR iconvconfig (8)
Signature · 7 lines
Michael Kerrisk Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/ Linux/UNIX System Programming Training: http://man7.org/training/ -- To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): [email protected]
Hi,
Quoted 7 lines · Michael Kerrisk (man-pages)
Quoted 3 lines · Marko Myllynen
while updating the locale pages I noticed there was no iconv(1) page in upstream so I wrote one, please see below.
Thanks for doing this. Could I ask you to look at the comments below, and send a revised version, please.
ok, please see below, hopefully the explanation are now clearer without going into too low level details.
From 89f1618b102c6f591977bf9f925523f97b97d755 Mon Sep 17 00:00:00 2001
From: Marko Myllynen <[email protected]>
Date: Wed, 11 Jun 2014 08:39:56 +0300
Subject: [PATCH] iconv.1: New page for iconv(1)
--- man1/iconv.1 | 174 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 174 insertions(+), 0 deletions(-) create mode 100644 man1/iconv.1
man1/iconv.1 new file +174 -0
@@ -0,0 +1,174 @@ +'\" t -*- coding: UTF-8 -*- +.\" +.\" Copyright (C) 2014 Marko Myllynen <[email protected]> +.\" +.\" %%%LICENSE_START(GPLv2+_DOC_FULL) +.\" This is free documentation; you can redistribute it and/or +.\" modify it under the terms of the GNU General Public License as +.\" published by the Free Software Foundation; either version 2 of +.\" the License, or (at your option) any later version. +.\" +.\" The GNU General Public License's references to "object code" +.\" and "executables" are to be interpreted as the output of any +.\" document formatting or typesetting system, including +.\" intermediate and printed output. +.\" +.\" This manual is distributed in the hope that it will be useful, +.\" but WITHOUT ANY WARRANTY; without even the implied warranty of +.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +.\" GNU General Public License for more details. +.\" +.\" You should have received a copy of the GNU General Public +.\" License along with this manual; if not, see +.\" <http://www.gnu.org/licenses/>. +.\" %%%LICENSE_END +.\" +.TH ICONV 1 2014-06-06 "GNU" "Linux User Manual" +.SH NAME +iconv \- convert text from one character encoding to another +.SH SYNOPSIS +.B iconv +.RI [ options ] +.RI "[-f " from-encoding "]" +.RI "[-t " to-encoding "]" +.RI [ inputfile ]... +.SH DESCRIPTION +The +.B iconv +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. +If no output file is given, +.B iconv +writes to the standard output. +.PP +If no +.I from-encoding +is given, the default is derived +from the current locale's character encoding. +If no +.I to-encoding +is given, the default is derived +from the current locale's character +encoding. +.SH OPTIONS +.TP +.BI \-f " from-encoding" ", \-\-from-code=" from-encoding +Use +.I from-encoding +for input characters. +.TP +.BI \-t " to-encoding" ", \-\-to-code=" to-encoding +Use +.I to-encoding +for output characters. + +If +.I to-encoding +is appended with +.BR //IGNORE , +characters that cannot be converted are discarded and an error is +printed after conversion. + +If +.I to-encoding +is appended with +.BR //TRANSLIT , +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 +looking characters. +Characters that are outside of the target character set and cannot be +transliterated are replaced with a question mark (?) in the output. +.TP +.B "\-l, \-\-list" +List all known character set encodings. +.TP +.B "\-c" +Silently discard characters that cannot be converted instead of +terminating when encountering such a character. +.TP +.BI \-o " outputfile" ", \-\-output=" outputfile +Use +.I outputfile +for output. +.TP +.B "\-s, \-\-silent" +This option is ignored, it is provided only for compatibility. +.TP +.B "\-\-verbose" +Print progress information on standard error when processing +multiple files. +.TP +.B "\-\-help" +Print a usage summary and exit. +.TP +.B "\-\-usage" +Print a short usage summary and exit. +.TP +.B "\-V, \-\-version" +Print the version number, license, and disclaimer of warranty for +.BR iconv . +.SH EXIT STATUS +Zero on success, non-zero on errors. +.SH ENVIRONMENT +Internally, the +.B iconv +program uses the +.BR iconv (3) +function which in turn uses +.I gconv +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 +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. +If +.B GCONV_PATH +is set, the system gconv module configuration cache (created by +.BR iconvconfig (8)) +will not be used. +Only directories containing the +.I gconv-modules +configuration files will be searched for the specified gconv modules. +.SH FILES +.TP +.I /usr/lib/gconv +Usual default gconv module path. +.TP +.I /usr/lib/gconv/gconv-modules +Usual default gconv module configuration. +.TP +.I /usr/lib/gconv/gconv-modules.cache +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 +.PP +The next example converts from UTF-8 to ASCII, transliterating when +possible: + +.nf +$ \fBecho abc ß α € àḃç | iconv -f UTF-8 -t ASCII//TRANSLIT\fP +abc ss ? EUR abc +$ +.fi +.SH "SEE ALSO" +.BR locale (1), +.BR iconv (3), +.BR nl_langinfo (3), +.BR charsets (7), +.BR iconvconfig (8)
Signature · 11 lines
1.7.1 Thanks, -- Marko Myllynen -- To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): [email protected]
Hi Marko,
Quoted 5 lines · Marko Myllynen
Hi,
Quoted 2 lines · Michael Kerrisk (man-pages)
Quoted 1 line · Marko Myllynen
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
while updating the locale pages I noticed there was no iconv(1) page in upstream so I wrote one, please see below.
Thanks for doing this. Could I ask you to look at the comments below, and send a revised version, please.
ok, please see below, hopefully the explanation are now clearer without going into too low level details.
Yes, thanks, a lot better. I have applied this, but have a question, below.
[...]
Quoted 7 lines
+.SH ENVIRONMENT
man1/iconv.1 new file +6
-0+Internally, the +.B iconv +program uses the +.BR iconv (3) +function which in turn uses +.I gconv
man1/iconv.1 line 132
Quoted 10 lines
man1/iconv.1 new file +10
-0+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 +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.
That last sentence is long and hard to parse. What exactly is GCONV_PATH? Is it a list of configuration paths? module search paths? I am left uncertain after reading that sentence.
Cheers,
Michael
Signature · 7 lines
Michael Kerrisk Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/ Linux/UNIX System Programming Training: http://man7.org/training/ -- To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): [email protected]
Hi,
Quoted 28 lines · Michael Kerrisk (man-pages)
Quoted 11 lines · Marko Myllynen
Quoted 7 lines · Michael Kerrisk (man-pages)
Quoted 3 lines · Marko Myllynen
while updating the locale pages I noticed there was no iconv(1) page in upstream so I wrote one, please see below.
Thanks for doing this. Could I ask you to look at the comments below, and send a revised version, please.
ok, please see below, hopefully the explanation are now clearer without going into too low level details.
Yes, thanks, a lot better. I have applied this, but have a question, below.
Quoted 13 lines
+.SH ENVIRONMENT
man1/iconv.1 new file +12
-0+Internally, the +.B iconv +program uses the +.BR iconv (3) +function which in turn uses +.I gconv +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 +are used, but
Quoted 8 lines
man1/iconv.1 line 132
Quoted 4 lines
+.B
GCONV_PATHman1/iconv.1 new file +3
-0+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.That last sentence is long and hard to parse. What exactly is
GCONV_PATH? Is it a list of configuration paths? module search paths? I am left uncertain after reading that sentence.
yeah, I think I was trying to make a long story too short.
When a program, such as iconv(1), uses iconv(3) (the function), it first needs to allocate a conversion descriptor with iconv_open(3) and during the iconv_open() call glibc, if GCONV_PATH is not set, loads the system gconv cache file created by iconvconfig(8) and based on the configuration then loads the needed gconv modules for conversion (an example of a gconv module is CP1252.so). If GCONV_PATH is set, glibc first tries to load the configuration files from the paths in GCONV_PATH followed by the system configuration file. If a directory does not contain a gconv module configuration file, possible gconv modules in it are ignored. If a directory contains a gconv module configuration file and it is determined that a needed module for this conversion is available in the directory, then the needed module is loaded from there, the order being so that the first suitable module found in GCONV_PATH is used. This allows users to use custom modules and even replace system provided modules by providing such modules in GCONV_PATH directories.
Thanks,
Signature · 5 lines
Marko Myllynen -- To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): [email protected]
HI Marko,
Quoted 42 lines · Marko Myllynen
Hi,
Quoted 28 lines · Michael Kerrisk (man-pages)
Quoted 11 lines · Marko Myllynen
Quoted 7 lines · Michael Kerrisk (man-pages)
Quoted 3 lines · Marko Myllynen
while updating the locale pages I noticed there was no iconv(1) page in upstream so I wrote one, please see below.
Thanks for doing this. Could I ask you to look at the comments below, and send a revised version, please.
ok, please see below, hopefully the explanation are now clearer without going into too low level details.
Yes, thanks, a lot better. I have applied this, but have a question, below.
Quoted 13 lines
+.SH ENVIRONMENT
man1/iconv.1 new file +12
-0+Internally, the +.B iconv +program uses the +.BR iconv (3) +function which in turn uses +.I gconv +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 +are used, butQuoted 8 lines
man1/iconv.1 line 132
Quoted 4 lines
+.B
GCONV_PATHman1/iconv.1 new file +3
-0+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.That last sentence is long and hard to parse. What exactly is
GCONV_PATH? Is it a list of configuration paths? module search paths? I am left uncertain after reading that sentence.yeah, I think I was trying to make a long story too short.
Quoted 15 lines
When a program, such as iconv(1), uses iconv(3) (the function), it first needs to allocate a conversion descriptor with
iconv_open(3)and during theiconv_open()call glibc, ifGCONV_PATHis not set, loads the system gconv cache file created by iconvconfig(8) and based on the configuration then loads the needed gconv modules for conversion (an example of a gconv module is CP1252.so). IfGCONV_PATHis set, glibc first tries to load the configuration files from the paths inGCONV_PATHfollowed by the system configuration file. If a directory does not contain a gconv module configuration file, possible gconv modules in it are ignored. If a directory contains a gconv module configuration file and it is determined that a needed module for this conversion is available in the directory, then the needed module is loaded from there, the order being so that the first suitable module found inGCONV_PATHis used. This allows users to use custom modules and even replace system provided modules by providing such modules inGCONV_PATHdirectories.
It sounds like you mean the above paragraph should be added to the page. Is that correct?
Cheers,
Michael
Signature · 7 lines
Michael Kerrisk Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/ Linux/UNIX System Programming Training: http://man7.org/training/ -- To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): CAKgNAkj=Y6P+C4SYegOejWJwGJQE96Jr6=Hej9PQFRiDXLzTDQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org
Hi,
Quoted 57 lines · Michael Kerrisk (man-pages)
Quoted 40 lines · Marko Myllynen
Quoted 28 lines · Michael Kerrisk (man-pages)
Quoted 11 lines · Marko Myllynen
Quoted 7 lines · Michael Kerrisk (man-pages)
Quoted 3 lines · Marko Myllynen
while updating the locale pages I noticed there was no iconv(1) page in upstream so I wrote one, please see below.
Thanks for doing this. Could I ask you to look at the comments below, and send a revised version, please.
ok, please see below, hopefully the explanation are now clearer without going into too low level details.
Yes, thanks, a lot better. I have applied this, but have a question, below.
Quoted 13 lines
+.SH ENVIRONMENT
(quoted diff) +12
-0+Internally, the +.B iconv +program uses the +.BR iconv (3) +function which in turn uses +.I gconv +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 +are used, butQuoted 8 lines
Review
Quoted 4 lines
+.B
GCONV_PATH(quoted diff) +3
-0+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.That last sentence is long and hard to parse. What exactly is
GCONV_PATH? Is it a list of configuration paths? module search paths? I am left uncertain after reading that sentence.yeah, I think I was trying to make a long story too short.
Quoted 15 lines
When a program, such as iconv(1), uses iconv(3) (the function), it first needs to allocate a conversion descriptor with
iconv_open(3)and during theiconv_open()call glibc, ifGCONV_PATHis not set, loads the system gconv cache file created by iconvconfig(8) and based on the configuration then loads the needed gconv modules for conversion (an example of a gconv module is CP1252.so). IfGCONV_PATHis set, glibc first tries to load the configuration files from the paths inGCONV_PATHfollowed by the system configuration file. If a directory does not contain a gconv module configuration file, possible gconv modules in it are ignored. If a directory contains a gconv module configuration file and it is determined that a needed module for this conversion is available in the directory, then the needed module is loaded from there, the order being so that the first suitable module found inGCONV_PATHis used. This allows users to use custom modules and even replace system provided modules by providing such modules inGCONV_PATHdirectories.
Quoted 2 lines
It sounds like you mean the above paragraph should be added to the page. Is that correct?
I was more like providing all the details and wasn't thinking to include the paragraph at least as-is. But if you think it seems suitable to be added, please go ahead. I'd personally prefer a more compact version but compacting the message without losing precision in this case seems a bit hard.
Thanks,
Signature · 5 lines
Marko Myllynen -- To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 60 lines · Marko Myllynen
Hi,
Quoted 57 lines · Michael Kerrisk (man-pages)
Quoted 55 lines · Marko Myllynen
Quoted 28 lines · Michael Kerrisk (man-pages)
Quoted 11 lines · Marko Myllynen
Quoted 7 lines · Michael Kerrisk (man-pages)
Quoted 3 lines · Marko Myllynen
while updating the locale pages I noticed there was no iconv(1) page in upstream so I wrote one, please see below.
Thanks for doing this. Could I ask you to look at the comments below, and send a revised version, please.
ok, please see below, hopefully the explanation are now clearer without going into too low level details.
Yes, thanks, a lot better. I have applied this, but have a question, below.
Quoted 13 lines
+.SH ENVIRONMENT
(quoted diff) +12
-0+Internally, the +.B iconv +program uses the +.BR iconv (3) +function which in turn uses +.I gconv +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 +are used, butQuoted 8 lines
Review
Quoted 4 lines
+.B
GCONV_PATH(quoted diff) +3
-0+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.That last sentence is long and hard to parse. What exactly is
GCONV_PATH? Is it a list of configuration paths? module search paths? I am left uncertain after reading that sentence.yeah, I think I was trying to make a long story too short.
When a program, such as iconv(1), uses iconv(3) (the function), it first needs to allocate a conversion descriptor with
iconv_open(3)and during theiconv_open()call glibc, ifGCONV_PATHis not set, loads the system gconv cache file created by iconvconfig(8) and based on the configuration then loads the needed gconv modules for conversion (an example of a gconv module is CP1252.so). IfGCONV_PATHis set, glibc first tries to load the configuration files from the paths inGCONV_PATHfollowed by the system configuration file. If a directory does not contain a gconv module configuration file, possible gconv modules in it are ignored. If a directory contains a gconv module configuration file and it is determined that a needed module for this conversion is available in the directory, then the needed module is loaded from there, the order being so that the first suitable module found inGCONV_PATHis used. This allows users to use custom modules and even replace system provided modules by providing such modules inGCONV_PATHdirectories.
Quoted 8 lines
Quoted 2 lines
It sounds like you mean the above paragraph should be added to the page. Is that correct?
I was more like providing all the details and wasn't thinking to include the paragraph at least as-is. But if you think it seems suitable to be added, please go ahead. I'd personally prefer a more compact version but compacting the message without losing precision in this case seems a bit hard.
So, how does the following look to you:
ENVIRONMENT
Internally, the iconv program uses the iconv(3) function which
in turn uses gconv modules (dynamically loaded shared
libraries) to convert to and from a character set. Before
calling iconv(3), the iconv program must first allocate a con‐ version descriptor using iconv_open(3). The operation of the latter function is influenced by the setting of the GCONV_PATH environment variable:
* If GCONV_PATH is not set, iconv_open(3) loads the system gconv cache file created by iconvconfig(8) and then, based on the configuration, loads the gconv modules needed to per‐ form the conversion.
* If GCONV_PATH is defined (as a colon-separated list of path‐ names), the system gconv module configuration cache is not
used. Instead, iconv_open(3) first tries to load the con‐
figuration files from one of the directories in GCONV_PATH, followed by the system configuration file. If a directory does not contain a gconv module configuration file, any gconv modules that it may contain are ignored. If a direc‐ tory contains a gconv module configuration file and it is determined that a module needed for this conversion is available in the directory, then the needed module is loaded from that directory, the order being such that the first
suitable module found in GCONV_PATH is used. This allows
users to use custom modules and even replace system-provided modules by providing such modules in GCONV_PATH directories.
iconv supports any character set for which a corresponding gconv configuration and module are provided.
I have two doubts about the above text:
* What is "the system configuration file"?
* The last sentence (left over from your earlier text) seems out of place. Is it needed? If it is, I think we need a better place for it.
Thanks,
Michael
Signature · 7 lines
Michael Kerrisk Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/ Linux/UNIX System Programming Training: http://man7.org/training/ -- To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): [email protected]
Hi,
Quoted 9 lines · Michael Kerrisk (man-pages)
Quoted 6 lines · Marko Myllynen
Quoted 5 lines · Michael Kerrisk (man-pages)
Quoted 4 lines · Marko Myllynen
Quoted 3 lines · Michael Kerrisk (man-pages)
Quoted 2 lines · Marko Myllynen
Quoted 1 line · Michael Kerrisk (man-pages)
On 06/10/2014 10:38 AM, Marko Myllynen wrote:
So, how does the following look to you:
it looks very good, thanks for this!
Quoted 29 lines
ENVIRONMENT
Internally, the iconv program uses the iconv(3) function which
in turn uses gconv modules (dynamically loaded shared
libraries) to convert to and from a character set. Before
calling iconv(3), the iconv program must first allocate a con‐ version descriptor usingiconv_open(3). The operation of the latter function is influenced by the setting of theGCONV_PATHenvironment variable:* If
GCONV_PATHis not set,iconv_open(3)loads the system gconv cache file created by iconvconfig(8) and then, based on the configuration, loads the gconv modules needed to per‐ form the conversion.* If
GCONV_PATHis defined (as a colon-separated list of path‐ names), the system gconv module configuration cache is not
used. Instead,iconv_open(3)first tries to load the con‐
figuration files from one of the directories inGCONV_PATH, followed by the system configuration file. If a directory does not contain a gconv module configuration file, any gconv modules that it may contain are ignored. If a direc‐ tory contains a gconv module configuration file and it is determined that a module needed for this conversion is available in the directory, then the needed module is loaded from that directory, the order being such that the first
suitable module found inGCONV_PATHis used. This allows
users to use custom modules and even replace system-provided modules by providing such modules inGCONV_PATHdirectories.
Quoted 6 lines
iconv supports any character set for which a corresponding gconv configuration and module are provided.
I have two doubts about the above text:
* What is "the system configuration file"?
It is listed in the FILES section, does that clarify enough?
Quoted 3 lines
* The last sentence (left over from your earlier text) seems out of place. Is it needed? If it is, I think we need a better place for it.
I think the same thing is already said (albeit slightly less explicitly) above it so I don't think it's needed anymore.
Thanks,
Signature · 5 lines
Marko Myllynen -- To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): [email protected]
Hi Marko,
Quoted 44 lines · Marko Myllynen
Hi,
Quoted 9 lines · Michael Kerrisk (man-pages)
Quoted 6 lines · Marko Myllynen
Quoted 5 lines · Michael Kerrisk (man-pages)
Quoted 4 lines · Marko Myllynen
Quoted 3 lines · Michael Kerrisk (man-pages)
Quoted 2 lines · Marko Myllynen
Quoted 1 line · Michael Kerrisk (man-pages)
On 06/10/2014 10:38 AM, Marko Myllynen wrote:
So, how does the following look to you:
it looks very good, thanks for this!
Quoted 29 lines
ENVIRONMENT
Internally, the iconv program uses the iconv(3) function which
in turn uses gconv modules (dynamically loaded shared
libraries) to convert to and from a character set. Before
calling iconv(3), the iconv program must first allocate a con‐ version descriptor usingiconv_open(3). The operation of the latter function is influenced by the setting of theGCONV_PATHenvironment variable:* If
GCONV_PATHis not set,iconv_open(3)loads the system gconv cache file created by iconvconfig(8) and then, based on the configuration, loads the gconv modules needed to per‐ form the conversion.* If
GCONV_PATHis defined (as a colon-separated list of path‐ names), the system gconv module configuration cache is not
used. Instead,iconv_open(3)first tries to load the con‐
figuration files from one of the directories inGCONV_PATH, followed by the system configuration file. If a directory does not contain a gconv module configuration file, any gconv modules that it may contain are ignored. If a direc‐ tory contains a gconv module configuration file and it is determined that a module needed for this conversion is available in the directory, then the needed module is loaded from that directory, the order being such that the first
suitable module found inGCONV_PATHis used. This allows
users to use custom modules and even replace system-provided modules by providing such modules inGCONV_PATHdirectories.
Quoted 8 lines
Quoted 6 lines
iconv supports any character set for which a corresponding gconv configuration and module are provided.
I have two doubts about the above text:
* What is "the system configuration file"?
It is listed in the FILES section, does that clarify enough?
I wondered about that. But the term "system configuration file" does not appear in FILES. Is it "Usual default gconv module configuration"? If so, that's not so obvious because the terms differ.
Quoted 6 lines
Quoted 3 lines
* The last sentence (left over from your earlier text) seems out of place. Is it needed? If it is, I think we need a better place for it.
I think the same thing is already said (albeit slightly less explicitly) above it so I don't think it's needed anymore.
Okay -- I removed the sentence.
Cheers,
Michael
Signature · 7 lines
Michael Kerrisk Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/ Linux/UNIX System Programming Training: http://man7.org/training/ -- To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): CAKgNAkgc4ASriZyv7bhjBJ-H17KYX0b4Pwb8175y++pCD1ZXbg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org
Hi,
Quoted 35 lines · Michael Kerrisk (man-pages)
Quoted 35 lines
Quoted 35 lines
ENVIRONMENT
Internally, the iconv program uses the iconv(3) function which
in turn uses gconv modules (dynamically loaded shared
libraries) to convert to and from a character set. Before
calling iconv(3), the iconv program must first allocate a con‐ version descriptor usingiconv_open(3). The operation of the latter function is influenced by the setting of theGCONV_PATHenvironment variable:* If
GCONV_PATHis not set,iconv_open(3)loads the system gconv cache file created by iconvconfig(8) and then, based on the configuration, loads the gconv modules needed to per‐ form the conversion.* If
GCONV_PATHis defined (as a colon-separated list of path‐ names), the system gconv module configuration cache is not
used. Instead,iconv_open(3)first tries to load the con‐
figuration files from one of the directories inGCONV_PATH, followed by the system configuration file. If a directory does not contain a gconv module configuration file, any gconv modules that it may contain are ignored. If a direc‐ tory contains a gconv module configuration file and it is determined that a module needed for this conversion is available in the directory, then the needed module is loaded from that directory, the order being such that the first
suitable module found inGCONV_PATHis used. This allows
users to use custom modules and even replace system-provided modules by providing such modules inGCONV_PATHdirectories.iconv supports any character set for which a corresponding gconv configuration and module are provided.
I have two doubts about the above text:
Quoted 7 lines
Quoted 3 lines
Quoted 1 line
* What is "the system configuration file"?
It is listed in the FILES section, does that clarify enough?
I wondered about that. But the term "system configuration file" does not appear in FILES. Is it "Usual default gconv module configuration"? If so, that's not so obvious because the terms differ.
you're right, using "system default gconv module configuration" in both places should make it obvious.
Thanks,
Signature · 5 lines
Marko Myllynen -- To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 40 lines · Marko Myllynen
Hi,
Quoted 37 lines · Michael Kerrisk (man-pages)
Quoted 37 lines
Quoted 36 lines
ENVIRONMENT
Internally, the iconv program uses the iconv(3) function which
in turn uses gconv modules (dynamically loaded shared
libraries) to convert to and from a character set. Before
calling iconv(3), the iconv program must first allocate a con‐ version descriptor usingiconv_open(3). The operation of the latter function is influenced by the setting of theGCONV_PATHenvironment variable:* If
GCONV_PATHis not set,iconv_open(3)loads the system gconv cache file created by iconvconfig(8) and then, based on the configuration, loads the gconv modules needed to per‐ form the conversion.* If
GCONV_PATHis defined (as a colon-separated list of path‐ names), the system gconv module configuration cache is not
used. Instead,iconv_open(3)first tries to load the con‐
figuration files from one of the directories inGCONV_PATH, followed by the system configuration file. If a directory does not contain a gconv module configuration file, any gconv modules that it may contain are ignored. If a direc‐ tory contains a gconv module configuration file and it is determined that a module needed for this conversion is available in the directory, then the needed module is loaded from that directory, the order being such that the first
suitable module found inGCONV_PATHis used. This allows
users to use custom modules and even replace system-provided modules by providing such modules inGCONV_PATHdirectories.iconv supports any character set for which a corresponding gconv configuration and module are provided.
I have two doubts about the above text:
* What is "the system configuration file"?
Quoted 8 lines
Quoted 5 lines
Quoted 1 line
It is listed in the FILES section, does that clarify enough?
I wondered about that. But the term "system configuration file" does not appear in FILES. Is it "Usual default gconv module configuration"? If so, that's not so obvious because the terms differ.
you're right, using "system default gconv module configuration" in both places should make it obvious.
Done. And I made a similar change in the FILES section of iconvconfig.8.
Cheers,
Michael
Signature · 7 lines
Michael Kerrisk Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/ Linux/UNIX System Programming Training: http://man7.org/training/ -- To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html