Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

$'\uXXXX'



Hiya,

according to the manual:

  A string enclosed between `$'' and `'' is processed the same
  way as the string arguments of the print builtin, and the
  resulting string is considered to be entirely quoted.  A
  literal `'' character can be included in the string by using
  the `\'' escape.

But:

~$ print '<\u0041>'
<A>
~$ printf '%s\n' $'<\u0041>'
<>

~$ locale
LANG=en_GB.ISO-8859-15
LC_CTYPE=en_US.ISO-8859-15
LC_NUMERIC="en_GB.ISO-8859-15"
LC_TIME="en_GB.ISO-8859-15"
LC_COLLATE="en_GB.ISO-8859-15"
LC_MONETARY="en_GB.ISO-8859-15"
LC_MESSAGES="en_GB.ISO-8859-15"
LC_PAPER="en_GB.ISO-8859-15"
LC_NAME="en_GB.ISO-8859-15"
LC_ADDRESS="en_GB.ISO-8859-15"
LC_TELEPHONE="en_GB.ISO-8859-15"
LC_MEASUREMENT="en_GB.ISO-8859-15"
LC_IDENTIFICATION="en_GB.ISO-8859-15"
LC_ALL=

~$ dpkg -l | grep zsh
ii  zsh                                          4.3.4-25                    A shell with lots of features
ii  zsh-beta                                     4.3.4-dev-1+20071029-1      A shell with lots of features (dev tree)

~$ LC_ALL=C
~$ print $'\u00e9'
zsh: character not in range
zsh: segmentation fault  zsh-beta

Cheers,
Stéphane



Messages sorted by: Reverse Date, Date, Thread, Author