From 99b1d450f2eaa879665c6b238b0252a9e2bb6118 Mon Sep 17 00:00:00 2001 From: Ralph Corderoy Date: Wed, 24 Jan 2018 13:49:06 +0000 Subject: [PATCH] =?utf8?q?mhfixmsg.man:=20Replace=20UTF-8=20`=C2=A7'=20wit?= =?utf8?q?h=20`\(sc'=20troff=20escape.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit man page source is ASCII. GNU groff's troff's source is ISO 8859-1. The `§' in UTF-8 looks like `§' in ISO 8859-1. If those two bytes make it to a UTF-8 terminal then it appears as `§', but target something else, e.g. PDF, and the flaw shows. Also adjust test-manpages to grep for bytes other than HT, and SPACE to tilde, in the built man pages. A test of the source could be also be done for the Makefile's `all' target, but this one should remain to spot the build process breaking things, e.g. non-ASCII in $prefix. --- man/mhfixmsg.man | 8 ++++---- test/manpages/test-manpages | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/man/mhfixmsg.man b/man/mhfixmsg.man index c4181849..dd6c340a 100644 --- a/man/mhfixmsg.man +++ b/man/mhfixmsg.man @@ -74,7 +74,7 @@ then the part is not decoded (and a message will be displayed if .B \-verbose is enabled). Note that .B \-decodetext -binary can produce messages that are not compliant with RFC 5322, §2.1.1. +binary can produce messages that are not compliant with RFC 5322, \(sc2.1.1. .PP When the .B \-decodetext @@ -108,7 +108,7 @@ with its mandatory argument. The .B \-nodecodeheaderfieldbodies inhibits this transformation. The transformation can produce a message -that does not conform with RFC 2047, §1, paragraph 6, because the decoded +that does not conform with RFC 2047, \(sc1, paragraph 6, because the decoded header field body could contain unencoded non-ASCII characters. It is therefore not enabled by default. .PP @@ -120,7 +120,7 @@ switch selects this behavior and is enabled by default. The switch causes carriage return characters to be stripped from, and not inserted in, text content when it is decoded and encoded. Note that its use can cause the generation of MIME messages that do not conform -with RFC 2046, §4.1.1, paragraph 1. +with RFC 2046, \(sc4.1.1, paragraph 1. .PP The .B \-textcharset @@ -206,7 +206,7 @@ The switch enables a transformation to change the Content-Transfer-Encoding from an invalid value to 8-bit in message parts with a Content-Type of multipart and message, as required by -RFC 2045, §6.4. That condition is indicated by a \*(lqmust be +RFC 2045, \(sc6.4. That condition is indicated by a \*(lqmust be encoded in 7bit, 8bit, or binary\*(rq error message from .B mhlist and other diff --git a/test/manpages/test-manpages b/test/manpages/test-manpages index 6b2ee95a..768c8f26 100755 --- a/test/manpages/test-manpages +++ b/test/manpages/test-manpages @@ -48,8 +48,9 @@ fi rm -f "$actual" touch "$actual" - for manpage in man?/*.?; do + LC_ALL=C grep -n '[^ -~]' /dev/null "$manpage" 2>&1 | + sed 's/^/non-ascii:/' >>"$actual" groff -Tutf8 -mandoc $warnings "$manpage" >/dev/null 2>>"$actual" done -- 2.56.0