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

Re: printf %<n>s in UTF-8 is not always POSIX-compliant

On 2012-02-15 15:42:15 +0100, Oliver Kiddle wrote:
> Bart wrote:
> > Am I understanding correctly that the intent here is that ?? is a two-
> > byte character so %2s should print the two literal bytes, rather than
> > print the single logical character in a field two logical characters
> > wide?
> That's correct. The POSIX definition uses bytes. For multibyte
> behaviour, there is an L modifier. I don't really see the sense in it
> myself: I don't want to write low-level stuff in the shell.

I think that's for consistency with C. Also, the shell could then
be used as a front-end to test string-related things.

> Frank Terbeck wrote:
> > Frankly, that would be the vendor's fault then. There are many *MANY*
> > ksh implementations, that make for a reasonable link target (ksh93,
> > pdksh or mksh - to name just a few). Zsh is not one of them.
> The fact that zsh is far from a perfect emulation doesn't stop it from
> being useful. I don't necessarily want to install a separate ksh package
> and zsh will run ksh scripts at least as well as pdksh.

But then the emulation should be correct.

Vincent Lefèvre <vincent@xxxxxxxxxx> - 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)

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