[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
r6335 - trunk/gnue-common/src/apps
From: |
btami |
Subject: |
r6335 - trunk/gnue-common/src/apps |
Date: |
Sun, 19 Sep 2004 15:10:57 -0500 (CDT) |
Author: btami
Date: 2004-09-19 15:10:56 -0500 (Sun, 19 Sep 2004)
New Revision: 6335
Modified:
trunk/gnue-common/src/apps/i18n.py
Log:
hack against bogus Python locale modul
Modified: trunk/gnue-common/src/apps/i18n.py
===================================================================
--- trunk/gnue-common/src/apps/i18n.py 2004-09-18 09:45:48 UTC (rev 6334)
+++ trunk/gnue-common/src/apps/i18n.py 2004-09-19 20:10:56 UTC (rev 6335)
@@ -154,8 +154,14 @@
"""
This function returns the encoding of the currently active locale
@returns: encoding of the current locale
- """
- return locale.getlocale () [1] or 'ascii'
+ """
+ enc = locale.getlocale () [1]
+ # hack against bogus Python locale modul
+ if sys.platform == 'win32' and \
+ enc in ('1250', '1251','1252','1253','1254','1255','1256','1257','1258',):
+ return 'cp'+enc
+ else:
+ return enc or 'ascii'
# -----------------------------------------------------------------------------
@@ -166,7 +172,7 @@
"""
This function return the language of the currently acitve locale
@returns: language of the current locale
- """
+ """
return locale.getlocale () [0] or 'C'
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- r6335 - trunk/gnue-common/src/apps,
btami <=