[PATCH] stat: reformat quoted file names

Seb sbb at tuxfamily.org
Sun Jun 13 14:22:57 UTC 2010


Le Sun, 13 Jun 2010 12:20:21 +0200
walter harms <wharms at bfs.de> a écrit:

> 
> 
> Seb schrieb:
> > Le Sat, 12 Jun 2010 22:02:31 +0200
> > Denys Vlasenko <vda.linux at googlemail.com> a écrit:
> > 
> > 
> >> Busybox consistently uses 'string' instead of `string' quoting in messages.
> >> In the font I use, ` and ' look entirely different (they aren't
> >> mirror images of each other).
> > 
> > It looks the same in my font, I don't know why they chose such a fashion. Maybe
> > an old typo error due to X rendering that they don't fix to not break
> > existing scripts:
> > 
> >   http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
> > 
> >> Thus I used this style here too.
> > 
> > According to the link above, you were absolutely right.
> > 
> 
> 
> The quotes are language sensitiv this is obvious when you see the uotput of
> LANG=de_DE
> „/dev/cdrom“ -> „sr0“

Well, it works with German, but not with French:

$ LANG=fr_FR stat -c "%N" /dev/cdrom
`/dev/cdrom' -> `hdb'

It should be "« /dev/cdrom » -> « hdb »"... and with a proper English locale, it
should be something like this, I think:

‘/dev/cdrom’ -> ‘hdb‘

Visibly, the old X font used to render "`" as something very close to "'", but
it is not the case anymore. So, someone could have written `%s' by habit (this
was commonly used to simulate opening English quote with the old X font),
thinking to render what should be written '% s' in ASCII (or ‘%s’ in English).
That's why IMHO it can be supposed to be a problem with the original used font
which should be fixed by writing '%s' (at least with the "C" locale)...

++
Seb.


More information about the busybox mailing list