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


Message #17 received at 36887 <at> debbugs.gnu.org (full text, mbox):

From: Ulrich Mueller <ulm <at> gentoo.org>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: base-system <at> gentoo.org, Pádraig Brady <P <at> draigBrady.com>,
 36887 <at> debbugs.gnu.org
Subject: Re: bug#36887: coreutils-8.31: printf chokes on \u0041
Date: Fri, 02 Aug 2019 10:00:03 +0200
>>>>> On Fri, 02 Aug 2019, Paul Eggert wrote:

> 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

Seems quite obvious, it should do the same as these commands:

  printf '\045d\n' 1 2
  printf '\x25d\n' 1 2

This is different from C behaviour, because printf(3) doesn't deal with
backslash escapes at all, which are interpreted earlier during parsing
of the string literal. That's why I think the C reasoning doesn't apply
here.




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.