Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sun, 12 Nov 2017 16:19:51 -0600
From: "A. Wilcox" <awilfox@...lielinux.org>
To: musl@...ts.openwall.com
Subject: Re: setlocale behavior with 'missing' locales

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On 07/11/17 23:27, Rich Felker wrote:
> One notable issue is that, right now, we rely on being able to set 
> LC_MESSAGES to an arbitrary name even if there's no libc locale 
> definition for it; this is because gettext() relies on the name of
> the current LC_MESSAGES locale to find (application-specific)
> translation files that might exist even without a libc translation.
> I'm not sure how we would best keep this working under changes
> similar to the above.

I can think of two ways to handle it, but neither of them are all that
great:

1) Provide simple translations for the most common 90% of languages.
Some people are getting unfairly screwed here, but they are probably
getting screwed by every other app/library as well.  It should be very
simple to find a list of month names and abbreviations online for
pretty much any language (even using Wikipedia's month article
translations or Microsoft's Open Software Translations project).

2) Use an access(3) call for /usr/share/locale/$LC_MESSAGES.  This
means there is virtually no work for musl beyond adding the call, and
it will only succeed if the locale is available (which is exactly what
the standard demands).  The two problems I see with this is:

  1) if /usr/share is NFS shared this could lock.
     But it would do so anyway if setlocale(3) succeeded.

  2) it requires use of stdio which most people on this list hate.


Best,
- --arw

- -- 
A. Wilcox (awilfox)
Project Lead, Adélie Linux
http://adelielinux.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCAAGBQJaCMkFAAoJEMspy1GSK50UrVQP/2gPhSi1zUcLOBspP4Xs0P73
VEB1QvcRc1ZLmUH2DmOCYdPQzJkuBVGDWfy0ycofLvCl3rlIgAc/XSXwmNXQk2iI
h7MXfekyIvT61klLLAVW5HILUHH0pbBmrR8u1HapHln2Dhb5JjdL5Nk9bAQg9XWU
e7OCNI5zZ72yvo6cYHoLjDny2/yqMWc6lFgrieFnExmO2rkb1u5JYGd1S4aKNO1Y
ewzlBNG6quJ3p/zisJSPo8Goy2ybrOXvkiiXl+MRWfTR7lqHoJEYDs5a8TpcYXg6
Z5x1dqJoCE6yzM7pzureZATp6fpu7yzrDBckGNJbiAh0S2cGamZLGNBi4gZtq8fQ
0/SHjZ7wCECA9UtkRDdAgSjw8o5veGLXXsIS3Dpizpa4rNaWc7VAbIXPNxnxlJh7
XSOylciBw6/wx/9TgxTVYGMFJ6xMmmXNXlaNPaqYo6trjN/aXD7IOuU/z/hFbTFP
t1wW6rsNFwdbHpNRzZKg//toSi7pU44sXfKDMRQlbGwCXBAQigARZR5Fu6SfrCdm
N3VMUlOSXLATvv4oCF76eV/9jS1iPZOe9Pdpsf0gOXtB2fgOxw7tTz2t/dpF9a/G
XGdSBsjblu1S7YUBw7zli/OoxHXEdcbYFMPIFrXKY7+EcwpPtYEl/yddxjIforKn
xJY+4sEnd926h5zAImEg
=0DW3
-----END PGP SIGNATURE-----

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.