bh: thuban/Thuban/UI about.py,1.17,1.18
cvs@intevation.de
cvs at intevation.de
Fri Dec 17 19:48:51 CET 2004
Author: bh
Update of /thubanrepository/thuban/Thuban/UI
In directory doto:/tmp/cvs-serv10472/Thuban/UI
Modified Files:
about.py
Log Message:
* Thuban/UI/about.py (unicodeToLocale): Use getdefaultlocale
instead of getlocale because getlocale doesn't return a usable
encoding name on a german windows 2000
* setup.py: windows build: Removed the absolute path names and
made all prfixes relative to the directory containing setup.py.
Makes it a little easier to adapt to a different system.
Index: about.py
===================================================================
RCS file: /thubanrepository/thuban/Thuban/UI/about.py,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- about.py 27 Nov 2004 21:40:01 -0000 1.17
+++ about.py 17 Dec 2004 18:48:49 -0000 1.18
@@ -15,7 +15,7 @@
from wxPython.wx import *
-from locale import getlocale
+from locale import getdefaultlocale
from Thuban import _
from Thuban.version import versions
@@ -165,6 +165,8 @@
def unicodeToLocale(unicodeStr):
"Function to convert unicode to the user's locale encoding"
-
- return unicodeStr.encode(getlocale()[1])
-
+ # Under a german windows 2000 getlocale returns an encoding name
+ # that's not direcly usable (it's missing a "cp" at the beginning).
+ # getdefaultlocale does return a usable encoding name so we use that
+ # instead.
+ return unicodeStr.encode(getdefaultlocale()[1])
More information about the Thuban-devel
mailing list
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)