bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

unicode aware printf \u and \U switches not supported


From: Thomas Bartosik
Subject: unicode aware printf \u and \U switches not supported
Date: Mon, 22 Mar 2010 14:24:48 +0100

Configuration Information [Automatically generated, do not change]:
Machine: i686
OS: linux-gnu
Compiler: i686-pc-linux-gnu-gcc
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='i686' 
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i686-pc-linux-gnu' 
-DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash' -DSHELL 
-DHAVE_CONFIG_H   -I.  -I. -I./include -I./lib  
-DDEFAULT_PATH_VALUE='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'
 -DSTANDARD_UTILS_PATH='/bin:/usr/bin:/sbin:/usr/sbin' 
-DSYS_BASHRC='/etc/bash/bashrc' -DSYS_BASH_LOGOUT='/etc/bash/bash_logout' 
-DNON_INTERACTIVE_LOGIN_SHELLS -DSSH_SOURCE_BASHRC -O2 -march=core2 
-mfpmath=sse -msse4.1 -fomit-frame-pointer -pipe
uname output: Linux blackknight 2.6.31-gentoo-r6 #1 SMP PREEMPT Mon Nov 30 
19:03:35 CET 2009 i686 Intel(R) Core(TM)2 Duo CPU T9300 @ 2.50GHz GenuineIntel 
GNU/Linux
Machine Type: i686-pc-linux-gnu

Bash Version: 4.0
Patch Level: 35
Release Status: release

Description:
    bash's printf does not understand \u and \U although the man page says it 
supports all expressions that printf(1) supports. It would be perfect if bash's 
printf could do this as well (as I would not have to resort to an external 
utility when needing to print unicode characters as easily as coreutils' printf 
can do; especially on cygwin, when this is needed a few thousand times things 
get really slow, but that's not really a bash problem, just so you know how I 
noticed it...)

Repeat-By:
    tbart@blackknight ~ $ /usr/bin/printf "\u20AC\n"
    €
    tbart@blackknight ~ $ type printf
    printf is a shell builtin
    tbart@blackknight ~ $ printf "\u20AC\n"
    \u20AC


Fix:
    Please add the \u and \U functionality, if possible. Or correct the man 
page. The current state is erroneous however.. Thank you!
-- 
GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01




reply via email to

[Prev in Thread] Current Thread [Next in Thread]