* [PATCH] man/man1/iconv.1: Mention that -c does not change exit status @ 2025-06-05 12:46 Florian Weimer 2025-06-05 14:41 ` Carlos O'Donell 0 siblings, 1 reply; 3+ messages in thread From: Florian Weimer @ 2025-06-05 12:46 UTC (permalink / raw) To: Alejandro Colomar; +Cc: linux-man And that input decoding failures are treated as errors. Exiting with status 0 is a POSIX conformance issue that was fixed in glibc 2.41. Signed-off-by: Florian Weimer <fweimer@redhat.com> --- man/man1/iconv.1 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/man/man1/iconv.1 b/man/man1/iconv.1 index 2c8ae0d29..111ff9e89 100644 --- a/man/man1/iconv.1 +++ b/man/man1/iconv.1 @@ -55,6 +55,8 @@ is appended to .IR to-encoding , characters that cannot be converted are discarded and an error is printed after conversion. +(Characters that cannot be decoded are treated as an error with +or without this flag.) .IP If the string .B //TRANSLIT @@ -73,8 +75,11 @@ transliterated are replaced with a question mark (?) in the output. List all known character set encodings. .TP .B \-c -Silently discard characters that cannot be converted instead of +Discard characters that cannot be converted instead of terminating when encountering such characters. +.\" glibc commit 6cbf845fcdc76131d0e674cee454fe738b69c69d +POSIX requires that this option does not change +the exit status of the program. .TP .BI \-\-output= outputfile .TQ base-commit: 3c2e9ebe2d5ea15a47c1669f75b280cea42a6f8b ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] man/man1/iconv.1: Mention that -c does not change exit status 2025-06-05 12:46 [PATCH] man/man1/iconv.1: Mention that -c does not change exit status Florian Weimer @ 2025-06-05 14:41 ` Carlos O'Donell 2025-06-11 8:29 ` Alejandro Colomar 0 siblings, 1 reply; 3+ messages in thread From: Carlos O'Donell @ 2025-06-05 14:41 UTC (permalink / raw) To: Florian Weimer, Alejandro Colomar; +Cc: linux-man On 6/5/25 8:46 AM, Florian Weimer wrote: > And that input decoding failures are treated as errors. > > Exiting with status 0 is a POSIX conformance issue that was fixed > in glibc 2.41. > > Signed-off-by: Florian Weimer <fweimer@redhat.com> Confirmed 6cbf845fcdc76131d0e674cee454fe738b69c69d is the correct glibc git commit for this fix. Confirmed it was fixed in glibc 2.41 along with several other iconv fixes. Confirmed issue 8 contains the same language for -c and exit status must not change. Reviewed-by: Carlos O'Donell <carlos@redhat.com> > --- > man/man1/iconv.1 | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > diff --git a/man/man1/iconv.1 b/man/man1/iconv.1 > index 2c8ae0d29..111ff9e89 100644 > --- a/man/man1/iconv.1 > +++ b/man/man1/iconv.1 > @@ -55,6 +55,8 @@ is appended to > .IR to-encoding , > characters that cannot be converted are discarded and an error is > printed after conversion. > +(Characters that cannot be decoded are treated as an error with > +or without this flag.) > .IP > If the string > .B //TRANSLIT > @@ -73,8 +75,11 @@ transliterated are replaced with a question mark (?) in the output. > List all known character set encodings. > .TP > .B \-c > -Silently discard characters that cannot be converted instead of > +Discard characters that cannot be converted instead of > terminating when encountering such characters. > +.\" glibc commit 6cbf845fcdc76131d0e674cee454fe738b69c69d > +POSIX requires that this option does not change > +the exit status of the program. > .TP > .BI \-\-output= outputfile > .TQ > > base-commit: 3c2e9ebe2d5ea15a47c1669f75b280cea42a6f8b > > -- Cheers, Carlos. ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] man/man1/iconv.1: Mention that -c does not change exit status 2025-06-05 14:41 ` Carlos O'Donell @ 2025-06-11 8:29 ` Alejandro Colomar 0 siblings, 0 replies; 3+ messages in thread From: Alejandro Colomar @ 2025-06-11 8:29 UTC (permalink / raw) To: Carlos O'Donell; +Cc: Florian Weimer, linux-man [-- Attachment #1: Type: text/plain, Size: 2988 bytes --] Hi Florian, Carlos, On Thu, Jun 05, 2025 at 10:41:59AM -0400, Carlos O'Donell wrote: > On 6/5/25 8:46 AM, Florian Weimer wrote: > > And that input decoding failures are treated as errors. > > > > Exiting with status 0 is a POSIX conformance issue that was fixed > > in glibc 2.41. > > > > Signed-off-by: Florian Weimer <fweimer@redhat.com> > > Confirmed 6cbf845fcdc76131d0e674cee454fe738b69c69d is the correct glibc > git commit for this fix. > > Confirmed it was fixed in glibc 2.41 along with several other iconv fixes. > > Confirmed issue 8 contains the same language for -c and exit status must not change. > > Reviewed-by: Carlos O'Donell <carlos@redhat.com> Thanks for the patch and the review! I've applied the patch and review tag. <https://www.alejandro-colomar.es/src/alx/linux/man-pages/man-pages.git/commit/?h=contrib&id=b76a6fb88c3155de5ddb5fc42787aa3ee142b166> > > > --- > > man/man1/iconv.1 | 7 ++++++- > > 1 file changed, 6 insertions(+), 1 deletion(-) > > > > diff --git a/man/man1/iconv.1 b/man/man1/iconv.1 > > index 2c8ae0d29..111ff9e89 100644 > > --- a/man/man1/iconv.1 > > +++ b/man/man1/iconv.1 > > @@ -55,6 +55,8 @@ is appended to > > .IR to-encoding , > > characters that cannot be converted are discarded and an error is > > printed after conversion. > > +(Characters that cannot be decoded are treated as an error with > > +or without this flag.) I've amended this to break the line in a more appropriate place: +(Characters that cannot be decoded are treated as an error +with or without this flag.) See man-pages(7): $ MANWIDTH=72 man man-pages | sed -n '/Use semantic newlines/,/^$/p' Use semantic newlines In the source of a manual page, new sentences should be started on new lines, long sentences should be split into lines at clause breaks (commas, semicolons, colons, and so on), and long clauses should be split at phrase boundaries. This convention, sometimes known as "semantic newlines", makes it easier to see the effect of patches, which often operate at the level of individual sentences, clauses, or phrases. Have a lovely day! Alex > > .IP > > If the string > > .B //TRANSLIT > > @@ -73,8 +75,11 @@ transliterated are replaced with a question mark (?) in the output. > > List all known character set encodings. > > .TP > > .B \-c > > -Silently discard characters that cannot be converted instead of > > +Discard characters that cannot be converted instead of > > terminating when encountering such characters. > > +.\" glibc commit 6cbf845fcdc76131d0e674cee454fe738b69c69d > > +POSIX requires that this option does not change > > +the exit status of the program. > > .TP > > .BI \-\-output= outputfile > > .TQ > > > > base-commit: 3c2e9ebe2d5ea15a47c1669f75b280cea42a6f8b > > > > > > > -- > Cheers, > Carlos. > -- <https://www.alejandro-colomar.es/> [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 833 bytes --] ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-06-11 8:29 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2025-06-05 12:46 [PATCH] man/man1/iconv.1: Mention that -c does not change exit status Florian Weimer 2025-06-05 14:41 ` Carlos O'Donell 2025-06-11 8:29 ` Alejandro Colomar
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox