On 12/7/10 11:12 AM, Roman Rakus wrote:
> This one is already reported on coreutils:
> http://debbugs.gnu.org/cgi/bugreport.cgi?msg=2;bug=7574
>
> The problem is with numbers higher than /0377; echo and printf consumes all
> 3 numbers, but it is not 8-bit number. For example:
> $ echo -e '\0610'; printf '\610 %b\n' '\610 \0610'
> Should output:
> 10
> 10 10 10
> instead of
> �
> � � �
No, it shouldn't. This is a terrible idea. All other shells I tested
behave as bash does*, bash behaves as Posix specifies, and the bash
behavior is how C character constants work. Why would I change this?
(*That is, consume up to three octal digits and mask off all but the lower
8 bits of the result.)
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU [email protected] http://cnswww.cns.cwru.edu/~chet/