/[thuban]/trunk/thuban/Thuban/UI/about.py
ViewVC logotype

Diff of /trunk/thuban/Thuban/UI/about.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2428 by jan, Sat Nov 27 21:40:01 2004 UTC revision 2525 by bernhard, Thu Jan 20 10:00:34 2005 UTC
# Line 15  __version__ = "$Revision$" Line 15  __version__ = "$Revision$"
15    
16  from wxPython.wx import *  from wxPython.wx import *
17    
18  from locale import getlocale  from locale import getdefaultlocale
19    
20  from Thuban import _  from Thuban import _
21  from Thuban.version import versions  from Thuban.version import versions
# Line 165  class About(wxDialog): Line 165  class About(wxDialog):
165    
166  def unicodeToLocale(unicodeStr):  def unicodeToLocale(unicodeStr):
167      "Function to convert unicode to the user's locale encoding"      "Function to convert unicode to the user's locale encoding"
168        # Under a german windows 2000 getlocale returns an encoding name
169      return unicodeStr.encode(getlocale()[1])      # that's not direcly usable (it's missing a "cp" at the beginning).
170        # getdefaultlocale does return a usable encoding name so we use that
171        # instead.
172        locale=getdefaultlocale()[1]
173        if locale is None:
174            locale = 'iso-8859-15'
175        return unicodeStr.encode(locale)

Legend:
Removed from v.2428  
changed lines
  Added in v.2525

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26