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: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Pádraig Brady <P <at> draigBrady.com>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#36887: closed (coreutils-8.31: printf chokes on \u0041)
Date: Wed, 07 Jun 2023 14:58:01 +0000
[Message part 1 (text/plain, inline)]
Your message dated Wed, 7 Jun 2023 15:57:01 +0100
with message-id <5b24e888-d47b-be16-4e46-8bf3e6bff425 <at> draigBrady.com>
and subject line Re: bug#36887: coreutils-8.31: printf chokes on \u0041
has caused the debbugs.gnu.org bug report #36887,
regarding coreutils-8.31: printf chokes on \u0041
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
36887: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=36887
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Ulrich Mueller <ulm <at> gentoo.org>
To: bug-coreutils <at> gnu.org
Cc: base-system <at> gentoo.org
Subject: coreutils-8.31: printf chokes on \u0041
Date: Thu, 01 Aug 2019 13:02:26 +0200
[Forwarding bug https://bugs.gentoo.org/680244 as requested by the
Gentoo package maintainer.]

According to printf(1):

   Interpreted sequences are:
   [...]
   
   \uHHHH Unicode (ISO/IEC 10646) character with hex value HHHH (4 digits)

   \UHHHHHHHH
          Unicode character with hex value HHHHHHHH (8 digits)

It does not work, though:

$ /usr/bin/printf '\u0041\n'
/usr/bin/printf: invalid universal character name \u0041
$ /usr/bin/printf '\U00000041\n'
/usr/bin/printf: invalid universal character name \U00000041

Other tools interpret the sequence correctly:

$ printf '\u0041\n'   # bash
A
$ echo -e '\u0041'    # bash
A
$ zsh -c "echo -e '\u0041'"
A
$ emacs -Q --batch --eval '(princ "\u0041\n")'
A
$ python -c "print ('\u0041')"
A
$ ruby -e 'print("\u0041\n")'
A


[Message part 3 (message/rfc822, inline)]
From: Pádraig Brady <P <at> draigBrady.com>
To: Ulrich Mueller <ulm <at> gentoo.org>
Cc: 36887-done <at> debbugs.gnu.org
Subject: Re: bug#36887: coreutils-8.31: printf chokes on \u0041
Date: Wed, 7 Jun 2023 15:57:01 +0100
On 07/06/2023 15:16, Ulrich Mueller wrote:
> Can this bug be closed? AFAICS it is fixed since coreutils-9.2.
> 
> Relevant commit:
> https://git.savannah.gnu.org/cgit/coreutils.git/commit/src/printf.c?id=0925e8a0f413ecf9004153d89b312b385b20d0ee

Marked as done.

thanks!
Pádraig



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.