Package: zsh
Version: 4.3.2-14
Severity: normal

zsh's builtin printf fails to interpret two-digit octal escape, such as '\1'
or '\33'.  For example:

zsh% printf '\33abc' | hd
00000000  5c 33 33 61 62 63                                 |\33abc|
00000006

On the other hand, the printf from textutils handles them:

$ /usr/bin/printf '\33abc' | hd
00000000  1b 61 62 63                                       |.abc|
00000004

The zshbuiltins man page promises "formatting rules are the same as used in
C", and C explicitly supports single-digit and double-digit octal escapes in
string and character literals -- see section "6.4.4.4 Character constants"
of the C99 standard.

Furthermore, POSIX explicitly states that \d and \dd are supported by
printf(1) -- see http://tinyurl.com/gkdfr/, extended description, item 3. 
The Solaris printf(1), the bash printf builtin, and the FreeBSD printf(1)
all support them.

-- System Information:
Debian Release: testing/unstable
  APT prefers testing
  APT policy: (900, 'testing'), (500, 'stable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.16-2-686
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1)

Versions of packages zsh depends on:
ii  debconf [debconf-2.0]        1.5.3       Debian configuration management sy
ii  libc6                        2.3.6.ds1-4 GNU C Library: Shared libraries
ii  libncurses5                  5.5-2       Shared libraries for terminal hand

Versions of packages zsh recommends:
ii  libcap1                       1:1.10-14  support for getting/setting POSIX.
ii  libpcre3                      6.4-2      Perl 5 Compatible Regular Expressi

-- debconf information excluded


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to