[issue8374] Some locales are unsupported

2010-04-12 Thread Martin v . Löwis
Martin v. Löwis 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 determining the

[issue8374] Some locales are unsupported

2010-04-12 Thread Jeroen Ruigrok van der Werven
Jeroen Ruigrok van der Werven 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 with the CLDR guys as

[issue8374] Some locales are unsupported

2010-04-12 Thread Antoine Pitrou
Antoine Pitrou 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 Marc-Andre Lemburg
Marc-Andre Lemburg 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: thanks, Antoine

[issue8374] Some locales are unsupported

2010-04-12 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Martin v. Löwis wrote: > > Martin v. Löwis 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

[issue8374] Some locales are unsupported

2010-04-11 Thread Antoine Pitrou
Antoine Pitrou 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 regeneration of locale a

[issue8374] Some locales are unsupported

2010-04-11 Thread Martin v . Löwis
Martin v. Löwis 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: even if X11 decides

[issue8374] Some locales are unsupported

2010-04-11 Thread Antoine Pitrou
Antoine Pitrou 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 __

[issue8374] Some locales are unsupported

2010-04-11 Thread Antoine Pitrou
Antoine Pitrou 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). -- ___ Python tracker

[issue8374] Some locales are unsupported

2010-04-11 Thread Martin v . Löwis
Martin v. Löwis 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 is to find out the

[issue8374] Some locales are unsupported

2010-04-11 Thread Éric Araujo
Éric Araujo added the comment: Can we tell about getdefaultlocale’s uselessness in the docs? -- ___ Python tracker ___ ___ Python-bugs

[issue8374] Some locales are unsupported

2010-04-11 Thread Martin v . Löwis
Martin v. Löwis 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 feels like updating t

[issue8374] Some locales are unsupported

2010-04-11 Thread Antoine Pitrou
Antoine Pitrou 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: invalid -> versio

[issue8374] Some locales are unsupported

2010-04-11 Thread Luke Jennings
Luke Jennings 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 think that is calling the lo

[issue8374] Some locales are unsupported

2010-04-11 Thread Antoine Pitrou
Antoine Pitrou 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. -- nos

[issue8374] Some locales are unsupported

2010-04-11 Thread Éric Araujo
Éric Araujo 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 ___

[issue8374] Some locales are unsupported

2010-04-11 Thread Luke Jennings
Luke Jennings 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. -- ___ Python tracke

[issue8374] Some locales are unsupported

2010-04-11 Thread Éric Araujo
Éric Araujo 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 tracker

[issue8374] Some locales are unsupported

2010-04-11 Thread Éric Araujo
Éric Araujo 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 you nosy, since y

[issue8374] Some locales are unsupported

2010-04-11 Thread Luke Jennings
New submission from Luke Jennings : 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 retrieve the language code. Rel