[Pkg-zsh-devel] Bug#659932: zsh: printf %<n>s in UTF-8 is not always POSIX-compliant

Vincent Lefevre vincent at vinc17.net
Wed Feb 15 02:10:20 UTC 2012


Package: zsh
Version: 4.3.15-1
Severity: normal

In UTF-8 locales:

xvii% printf ".%2s.\n" é
. é.
xvii% emulate sh
xvii% printf ".%2s.\n" é
.é.
xvii% emulate ksh       
xvii% printf ".%2s.\n" é
. é.

It is correct in sh mode (according to POSIX[*]), but not in ksh mode,
which should also follow the POSIX behavior. What about zsh mode?

[*] http://pubs.opengroup.org/onlinepubs/9699919799/utilities/printf.html
and
http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap05.html#tag_05
for %<n>s.

-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 3.2.0-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=POSIX, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages zsh depends on:
ii  libc6      2.13-26
ii  libcap2    1:2.22-1
ii  libtinfo5  5.9-4

Versions of packages zsh recommends:
ii  libc6         2.13-26
ii  libncursesw5  5.9-4
ii  libpcre3      8.12-4

Versions of packages zsh suggests:
ii  zsh-doc  4.3.15-1

-- no debconf information





More information about the Pkg-zsh-devel mailing list