silke: thuban/Thuban/UI about.py,1.12,1.13

cvs@intevation.de cvs at intevation.de
Tue Aug 10 21:58:52 CEST 2004


Author: silke

Update of /thubanrepository/thuban/Thuban/UI
In directory doto:/tmp/cvs-serv13413/Thuban/UI

Modified Files:
	about.py 
Log Message:

Fixed encoding problem of about dialog: Added function unicodeToLocale() to
convert special characters to users locale encoding



Index: about.py
===================================================================
RCS file: /thubanrepository/thuban/Thuban/UI/about.py,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- about.py	26 Mar 2004 18:15:35 -0000	1.12
+++ about.py	10 Aug 2004 19:58:50 -0000	1.13
@@ -14,6 +14,8 @@
 
 from wxPython.wx import *
 
+import locale
+
 from Thuban import _
 from Thuban.version import versions
 from Thuban.Model.resource import gdal_support_status
@@ -33,9 +35,9 @@
         # characters to get byte strings in latin1.
         lead_developer = 'Bernhard Herzog'
         developers = [ 'Jonathan Coles', 'Frank Koormann',
-                       'Martin M\xfcller', 'Jan-Oliver Wagner' ]
+                       unicodeToLocale(u'Martin M\xfcller'), 'Jan-Oliver Wagner' ]
         translators = [ ( _('French'), 'Daniel Calvelo Aros' ),
-                        ( _('German'), 'Bj\xf6rn Broscheit'),
+                        ( _('German'), unicodeToLocale(u'Bj\xf6rn Broscheit')),
                         ( _('Italian'), 'Maurizio Napolitano'),
                         ( _('Portuguese (Brazilian)'), 'Eduardo Patto Kanegae'),
                         ( _('Russian'), 'Alex Shevlakov'),
@@ -128,4 +130,11 @@
     def OnCancel(self, event):
         self.EndModal(wxID_CANCEL)
 
+
+def unicodeToLocale(unicodeStr):
+    " Function to convert a unicode object to an object \ in the user's locale encoding"
+
+
+    import locale
+    return unicodeStr.encode(locale.getlocale()[1])
 





More information about the Thuban-devel mailing list

This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)