[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#36887: coreutils-8.31: printf chokes on \u0041
From: |
Ulrich Mueller |
Subject: |
bug#36887: coreutils-8.31: printf chokes on \u0041 |
Date: |
Fri, 02 Aug 2019 10:00:03 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
>>>>> 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.