On 01/14/2011 06:32 AM, Ondrej Vasik wrote: > As the same bash request for change in builtin echo and printf > (http://lists.gnu.org/archive/html/bug-bash/2010-12/msg00030.html and > https://www.opengroup.org/sophocles/show_mail.tpl?CALLER=show_archive.tpl&source=L&listname=austin-group-l&id=15087 > ) was rejected, I think we should do the same here to keep echo and printf > implementations as close as possible. > > Anyway, it would be better to be consistent in all utilities -e.g. > tr.c:502 now behaves the way proposed in the patch in this bugzilla - > and at least document that the ninth bit is ignored in the \@var{ooo} > section of info documentation.
The POSIX decision was to document that \400 has unspecified behavior (meaning the ninth bit can be ignored, an error issued, the string treated as \40 followed by a literal 0, or any other action). It doesn't bother me if we differ slightly from bash, as the behavior is already undefined and people should not be relying on it. http://austingroupbugs.net/view.php?id=249 If more than two hexadecimal digits immediately follow \x or if the octal value specified by \XXX will not fit in a byte, the results are unspecified. -- Eric Blake [email protected] +1-801-349-2682 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
