bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#36887: coreutils-8.31: printf chokes on \u0041


From: L A Walsh
Subject: bug#36887: coreutils-8.31: printf chokes on \u0041
Date: Fri, 02 Aug 2019 03:14:51 -0700
User-agent: Thunderbird

On 2019/08/01 16:37, Paul Eggert wrote:
> Ulrich Mueller wrote:
>   
>> Except for the surrogates
>> U+D800...U+DFFF, it looks like an arbitrary restriction
>>     
>
> It's not entirely arbitrary. Because of the restriction, coreutils printf 
> doesn't have to worry about what this command should do:
>
>    printf '\u0025d\n' 1 2
>
> Does this print a single line "%d", or two lines "1" and "2"? There are good 
> arguments either way, and one can easily construct even-stranger examples.
>   
There are no format characters in the initial line, so only the 1st
argument is interpreted.  You can't do multiple interpretations since if
you do there's no stopping point, (i.e. a hex-encode of a hex-encode of
'%d\n')










reply via email to

[Prev in Thread] Current Thread [Next in Thread]