[issue8374] Some locales are unsupported

2010-04-12 Thread Marc-Andre Lemburg
Marc-Andre Lemburg m...@egenix.com added the comment: Martin v. Löwis wrote: Martin v. Löwis mar...@v.loewis.de added the comment: getdefaultlocale is inherently unmaintainable, and shouldn't be used by applications. I wish it was removed from Python (but unfortunately, too many people

[issue8374] Some locales are unsupported

2010-04-12 Thread Marc-Andre Lemburg
Marc-Andre Lemburg m...@egenix.com added the comment: M.-A. Lemburg wrote: That said, if anybody feels like updating the tables from the various data sources, please go ahead. I last updated the table in 2008. Will do that again this week. I saw that Antoine already did this for me:

[issue8374] Some locales are unsupported

2010-04-12 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Could you tell me which X11 version you used ? I've modified the generation script to also output the added aliases and would like to list them as well. It's the file supplied on my Mandriva system, from libx11-1.2.2-2mdv2010.0.src.rpm

[issue8374] Some locales are unsupported

2010-04-12 Thread Jeroen Ruigrok van der Werven
Jeroen Ruigrok van der Werven asmo...@in-nomine.org added the comment: That nl_AW is an interesting one. Aruba is part of the Kingdom of the Netherlands, so in essence it should follow nl_NL. From what I can see that locale seems to be limited to (certain) Linux systems. I'll raise the issue

[issue8374] Some locales are unsupported

2010-04-12 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: getdefaultlocale() provides a way to access the default locale (and encoding) on a platform without requiring a call to setlocale(LC_ALL, ) That's what it's meant to do, but this is not what it actually does. In fact, there is no way of

[issue8374] Some locales are unsupported

2010-04-11 Thread Luke Jennings
New submission from Luke Jennings ubuntujenk...@googlemail.com: In the locale module there are some locales that are not supported these the ones that I am aware of are nl_AW, sr_RS sr_ME. This information was due to a project that captures screenshots in different languages and we have to

[issue8374] Some locales are unsupported

2010-04-11 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Hello Not a local expert here, but since this module relies on the underlying libc locale support. Do other programs work correctly with this locale? Apart from that, your program needs to catch and handle exceptions anyway. Martin, I’m making

[issue8374] Some locales are unsupported

2010-04-11 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Sorry for sending this too fast. The beginning should read: Not a locale expert here, but since this module relies on the underlying libc locale support, the bug is not Python-specific. -- ___ Python

[issue8374] Some locales are unsupported

2010-04-11 Thread Luke Jennings
Luke Jennings ubuntujenk...@googlemail.com added the comment: Other programs do work with the local. I am working on dealing with exceptions, I am rather new to programing and thought it would also be good to try and get this fixed in the original module. --

[issue8374] Some locales are unsupported

2010-04-11 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: What I’m saying is that the original module is not a bug. I’ll let Martin confirm or infirm :) Regards -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8374

[issue8374] Some locales are unsupported

2010-04-11 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: This doesn't look like a bug. You must install a locale before it gets available to Python. Furthermore, according to the original traceback ( http://launchpadlibrarian.net/43012745/quickshot-latin.log ), the locale module isn't even involved.

[issue8374] Some locales are unsupported

2010-04-11 Thread Luke Jennings
Luke Jennings ubuntujenk...@googlemail.com added the comment: Sorry for the confusion but that bug report has two very similar problems to it if you look at https://bugs.edge.launchpad.net/quickshot/+bug/554861/comments/7 and https://bugs.edge.launchpad.net/quickshot/+bug/554861/comments/6 . I

[issue8374] Some locales are unsupported

2010-04-11 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Actually, my diagnosis was wrong. The locale module contains a list of locale aliases and some of the Serbian ones are missing. A recent locale.alias file from X11 is more complete. -- nosy: +lemburg priority: - normal resolution:

[issue8374] Some locales are unsupported

2010-04-11 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: getdefaultlocale is inherently unmaintainable, and shouldn't be used by applications. I wish it was removed from Python (but unfortunately, too many people got tricked into believing that it does something useful). That said, if anybody

[issue8374] Some locales are unsupported

2010-04-11 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Can we tell about getdefaultlocale’s uselessness in the docs? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8374 ___

[issue8374] Some locales are unsupported

2010-04-11 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: Can we tell about getdefaultlocale’s uselessness in the docs? I haven't quite understood what people want to use that function for. If we knew the typical use cases, we could make recommendations what they should use instead. One use case

[issue8374] Some locales are unsupported

2010-04-11 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: However, these cases seem to be different. I think it can be used to find out the current language setting of the user, and trigger a third-party translation system (other than e.g. gettext). -- ___

[issue8374] Some locales are unsupported

2010-04-11 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: When the table is updated in trunk, can it be backported to 2.6? It does change a couple of mappings (example here is from sr_CS.* to sr_RS.*). -- ___ Python tracker rep...@bugs.python.org

[issue8374] Some locales are unsupported

2010-04-11 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: When the table is updated in trunk, can it be backported to 2.6? With the changes to the encodings for some of the locales (e.g. 'ru'), I would advise against such a backport. This also demonstrates one fundamental flaw of the approach:

[issue8374] Some locales are unsupported

2010-04-11 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Ok, the fix (updated tables) has been committed in trunk (r79977) and py3k (r79978). I suppose Ubuntu can backport the patch if they want their Python to be in sync with their own locales. (even better, distributions should include the