]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Document AIX 7.2 printf command gotcha
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 25 Dec 2019 22:18:49 +0000 (14:18 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 25 Dec 2019 22:19:10 +0000 (14:19 -0800)
* doc/autoconf.texi (Limitations of Builtins):
Document AIX 7.2 sh printf problem with octal escapes.

doc/autoconf.texi

index 2ac669696e730c051fbc072de4e5fe713f8b0f59..a591912a3bac9780d3d1b6aa0d89a3811b2a5329 100644 (file)
@@ -17987,6 +17987,12 @@ or @samp{%s} is probably easiest:
 printf %s -foo
 @end example
 
+AIX 7.2 @command{sh} mishandles octal escapes in multi-byte locales by
+treating them as characters instead of bytes.  For example, in a locale
+using the UTF-8 encoding, @samp{printf '\351'} outputs the two bytes C3,
+A9 (the UTF-8 encoding for U+00E9) instead of the desired single byte E9.
+To work around the bug, use the C locale.
+
 Bash 2.03 mishandles an escape sequence that happens to evaluate to @samp{%}:
 
 @example