dabo Commit
Revision 6327
Date: 2011-01-19 06:29:37 -0800 (Wed, 19 Jan 2011)
Author: Jacekk
Trac: http://trac.dabodev.com/changeset/6327

Changed:
U   trunk/dabo/__init__.py

Log:
Change in getEncoding() behaviour to use getdefaultlocale() instead of 
getlocale() function.
Difference is that while first returns e.g. 'cp874', the second returns '874', 
what isn't valid Python encoding key.

Diff:
Modified: trunk/dabo/__init__.py
===================================================================
--- trunk/dabo/__init__.py      2011-01-18 23:45:52 UTC (rev 6326)
+++ trunk/dabo/__init__.py      2011-01-19 14:29:37 UTC (rev 6327)
@@ -128,10 +128,7 @@
 from settings import *
 
 def getEncoding():
-       ret = locale.getlocale()[1]
-       if ret is None:
-               ret = defaultEncoding
-       return ret
+       return locale.getdefaultlocale()[1] or defaultEncoding
 
 def getXMLEncoding():
        ret = getEncoding()



_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: 
http://leafe.com/archives/byMID/[email protected]

Reply via email to