mailing list of musl libc
 help / color / mirror / code / Atom feed
From: "A. Wilcox" <awilfox@adelielinux.org>
To: musl@lists.openwall.com
Subject: Re: setlocale behavior with 'missing' locales
Date: Sun, 12 Nov 2017 16:19:51 -0600	[thread overview]
Message-ID: <5A08C907.2010209@adelielinux.org> (raw)
In-Reply-To: <20171108052715.GM1627@brightrain.aerifal.cx>

-----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-----


  reply	other threads:[~2017-11-12 22:19 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-08  5:03 Rich Felker
2017-11-08  5:27 ` Rich Felker
2017-11-12 22:19   ` A. Wilcox [this message]
2017-11-13  0:15     ` Rich Felker
2018-02-12  6:02       ` A. Wilcox
2018-02-12 20:04         ` Rich Felker
2018-03-01  1:13   ` Rich Felker
2018-03-01 19:10     ` William Pitcock
2018-03-01 19:25       ` Rich Felker
2018-03-01 20:45         ` Rich Felker
2018-03-02  1:43         ` Rich Felker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5A08C907.2010209@adelielinux.org \
    --to=awilfox@adelielinux.org \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

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

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).