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

Previous Next

Package: coreutils;

Reported by: Ulrich Mueller <ulm <at> gentoo.org>

Date: Thu, 1 Aug 2019 11:03:01 UTC

Severity: normal

Done: Pádraig Brady <P <at> draigBrady.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: L A Walsh <coreutils <at> tlinx.org>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: Ulrich Mueller <ulm <at> gentoo.org>, base-system <at> gentoo.org, Pádraig Brady <P <at> draigBrady.com>, 36887 <at> debbugs.gnu.org
Subject: bug#36887: coreutils-8.31: printf chokes on \u0041
Date: Fri, 02 Aug 2019 03:14:51 -0700
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')









This bug report was last modified 2 years and 44 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.