]> diplodocus.org Git - nmh/commitdiff
mhshow/test-charset: printf(1)'s octal doesn't need a leading zero.
authorRalph Corderoy <ralph@inputplus.co.uk>
Sat, 23 Sep 2017 13:14:12 +0000 (14:14 +0100)
committerRalph Corderoy <ralph@inputplus.co.uk>
Sat, 23 Sep 2017 13:14:12 +0000 (14:14 +0100)
The `\0344' was being interpreted as `\034' and `4'.  This can still be
converted from EBCDIC-US to UTF-8 by iconv(1) so the test worked, but it
was misleading.  Remove the leading zero as printf's octal escape is
`\nnn' where nnn is one to three octal digits.  It's echo(1) that
insists on a leading zero.  Fixes 6fd1d18f.

test/mhshow/test-charset

index 5414c9a..72aeb79 100755 (executable)
@@ -29,7 +29,7 @@ else
     #### FreeBSD10 buildbot.  It doesn't support EBCDIC-US, which is used
     #### by the checks, so check for that.  Though that doesn't seem to be
     #### the reason.
     #### FreeBSD10 buildbot.  It doesn't support EBCDIC-US, which is used
     #### by the checks, so check for that.  Though that doesn't seem to be
     #### the reason.
-    printf '\0344' | iconv -f EBCDIC-US -t UTF-8 >/dev/null 2>&1  ||
+    printf '\344' | iconv -f EBCDIC-US -t UTF-8 >/dev/null 2>&1  ||
         skip_param_value_checks=1
 fi
 
         skip_param_value_checks=1
 fi