This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mfabian
Recipients mfabian
Date 2013-11-09.08:22:39
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1383985359.98.0.423086716917.issue19534@psf.upfronthosting.co.za>
In-reply-to
Content
I think the patch I attach here is a better fix than the
patch in http://bugs.python.org/msg202469 because
it makes the normalize() function behave more logical overall,
with this patch, my test program prints:

mfabian@ari:/local/mfabian/src/cpython (2.7-mike %)
$ ./python ~/tmp/mike-test.py
ja_JP.UTF-8 -> ja_JP.UTF-8
de_DE.SJIS -> de_DE.SJIS
de_DE.foobar -> de_DE.foobar
sr_RS.UTF-8@latin -> sr_RS.UTF-8@latin
sr_rs@latin -> sr_RS.UTF-8@latin
sr@latin -> sr_RS.UTF-8@latin
sr_yu -> sr_RS.UTF-8@latin
sr_yu.SJIS@devanagari -> sr_RS.SJIS@devanagari
sr@foobar -> sr_RS.UTF-8@foobar
sR@foObar -> sr_RS.UTF-8@foobar
sR -> sr_RS.UTF-8
[18995 refs]
mfabian@ari:/local/mfabian/src/cpython (2.7-mike %)
$ 

The patch also contains a small fix for the “ks” and “sd”
locales in the locale_alias dictionary, they had the “.UTF-8”
in the wrong place:

-    'ks_in@devanagari':                     'ks_IN@devanagari.UTF-8',
+    'ks_in@devanagari':                     'ks_IN.UTF-8@devanagari',

-    'sd':                                   'sd_IN@devanagari.UTF-8',
+    'sd':                                   'sd_IN.UTF-8@devanagari',

(This error is inherited from the locale.alias file from X.org
where the locale_alias dictionary is generated from)
History
Date User Action Args
2013-11-09 08:22:40mfabiansetrecipients: + mfabian
2013-11-09 08:22:39mfabiansetmessageid: <1383985359.98.0.423086716917.issue19534@psf.upfronthosting.co.za>
2013-11-09 08:22:39mfabianlinkissue19534 messages
2013-11-09 08:22:39mfabiancreate