zsh-workers
 help / color / mirror / code / Atom feed
* printf %<n>s in UTF-8 is not always POSIX-compliant
@ 2012-02-15  2:15 Vincent Lefevre
  2012-02-15  8:14 ` Bart Schaefer
  0 siblings, 1 reply; 10+ messages in thread
From: Vincent Lefevre @ 2012-02-15  2:15 UTC (permalink / raw)
  To: zsh-workers

Hi,

I've reported the following bug:

  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=659932

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.

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


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2012-02-15 14:56 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-15  2:15 printf %<n>s in UTF-8 is not always POSIX-compliant Vincent Lefevre
2012-02-15  8:14 ` Bart Schaefer
2012-02-15  9:10   ` Vincent Lefevre
2012-02-15 11:05   ` Peter Stephenson
2012-02-15 11:53     ` Vincent Lefevre
2012-02-15 12:09       ` Frank Terbeck
2012-02-15 12:23         ` Peter Stephenson
2012-02-15 12:42         ` Vincent Lefevre
2012-02-15 14:42   ` Oliver Kiddle
2012-02-15 14:56     ` Vincent Lefevre

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).