[Pkg-zsh-devel] Bug#659932: Bug#659932: zsh: printf %<n>s in UTF-8 is not always POSIX-compliant
Vincent Lefevre
vincent at vinc17.net
Fri Dec 21 11:03:25 UTC 2012
reopen 659932
found 659932 5.0.0-2
thanks
On 2012-12-20 23:09:52 +0100, Axel Beckert wrote:
> Reading the thread started by
> http://www.zsh.org/mla/workers/2012/msg00149.html it seems as if this
> issue was basically a follow-up error of http://bugs.debian.org/659969
> which you reported on advise of upstream in that thread.
659969 is about zsh being in ksh alternatives, but the bug still
exists for both ksh and zsh.
For ksh, a simple solution might be to replace the printf builtin
to do:
1. Save the multibyte processing status.
2. Disable multibyte processing (unsetopt multibyte).
3. Execute the real printf builtin.
4. Restore multibyte processing.
For zsh, if it is really intended to differ from C, this needs to be
documented. It is currently said:
printf format [ arg ... ]
Print the arguments according to the format specification.
Formatting rules are the same as used in C. [...]
which is not the observed behavior.
--
Vincent Lefèvre <vincent at vinc17.net> - Web: <http://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)
More information about the Pkg-zsh-devel
mailing list