bug#36887: coreutils-8.31: printf chokes on \u0041
From:
Ulrich Mueller
Subject:
bug#36887: coreutils-8.31: printf chokes on \u0041
Date:
Thu, 01 Aug 2019 22:18:41 +0200
User-agent:
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)
>>>>> On Thu, 01 Aug 2019, Pádraig Brady wrote:
> I agree this is a bit surprising.
Indeed, it most certainly violates the principle of least surprise.
Especially, it means that a shell script that will run in bash won't
run in a shell that doesn't have a built-in printf.
> The full manual states:
> "Unicode characters in the ranges
> U+0000...U+009F, U+D800...U+DFFF cannot be specified by this syntax,
> except for U+0024 ($), U+0040 (@), and U+0060 (`)."
> This was previously discussed at:
>https://lists.gnu.org/archive/html/bug-coreutils/2008-05/threads.html#00067
So, there are reasons for this restriction in C99. However, I fail to
see how those reasons would apply to printf. Except for the surrogates
U+D800...U+DFFF, it looks like an arbitrary restriction, which only
makes the printf implementation incompatible with other GNU programs
(like Bash and Emacs).