bug-bash
[Top][All Lists]
Advanced

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

Re: unicode aware printf \u and \U switches not supported


From: Greg Wooledge
Subject: Re: unicode aware printf \u and \U switches not supported
Date: Tue, 23 Mar 2010 08:16:45 -0400
User-agent: Mutt/1.4.2.3i

On Mon, Mar 22, 2010 at 02:24:48PM +0100, Thomas Bartosik wrote:
> Repeat-By:
>     address@hidden ~ $ /usr/bin/printf "\u20AC\n"
>     ?
>     address@hidden ~ $ type printf
>     printf is a shell builtin
>     address@hidden ~ $ printf "\u20AC\n"
>     \u20AC

Must be a GNUism.  On HP-UX:

imadev:~$ /usr/bin/printf "\u20AC\n"
u20AC
imadev:~$ printf "\u20AC\n"
\u20AC

Wonder why the HP-UX printf(1) is eating the first backslash... *shrug*.

OpenBSD gives a warning:

cyclops:~$ /usr/bin/printf "\u20AC\n"
printf: unknown escape sequence `\u'
u20AC
cyclops:~$ echo $?
1

Then again, OpenBSD doesn't even have locale(1).




reply via email to

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