commit-gnue
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

r6253 - trunk/gnue-common/src/apps


From: reinhard
Subject: r6253 - trunk/gnue-common/src/apps
Date: Mon, 6 Sep 2004 02:30:53 -0500 (CDT)

Author: reinhard
Date: 2004-09-06 02:30:52 -0500 (Mon, 06 Sep 2004)
New Revision: 6253

Modified:
   trunk/gnue-common/src/apps/i18n.py
Log:
Never return None on getencoding () and getlanguage ()


Modified: trunk/gnue-common/src/apps/i18n.py
===================================================================
--- trunk/gnue-common/src/apps/i18n.py  2004-09-04 21:56:24 UTC (rev 6252)
+++ trunk/gnue-common/src/apps/i18n.py  2004-09-06 07:30:52 UTC (rev 6253)
@@ -155,7 +155,7 @@
   This function returns the encoding of the currently active locale
   @returns: encoding of the current locale
   """
-  return locale.getlocale () [1]
+  return locale.getlocale () [1] or 'ascii'
 
 
 # -----------------------------------------------------------------------------
@@ -167,7 +167,7 @@
   This function return the language of the currently acitve locale
   @returns: language of the current locale
   """
-  return locale.getlocale () [0]
+  return locale.getlocale () [0] or 'C'
 
 
 # ---------------------------------------------------------------------------





reply via email to

[Prev in Thread] Current Thread [Next in Thread]