Changeset 3061

Show
Ignore:
Timestamp:
11/17/06 22:26:21 (18 years ago)
Author:
jerome
Message:

Workaround locale problem when the locale used is not installed.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/pykota/tool.py

    r3055 r3061  
    136136        (self.language, self.charset) = locale.getlocale() 
    137137        self.language = self.language or "C" 
    138         self.charset = self.charset or locale.getpreferredencoding() 
     138        try : 
     139            self.charset = self.charset or locale.getpreferredencoding() 
     140        except locale.Error :     
     141            self.charset = sys.getfilesystemencoding() 
    139142         
    140143        # translation stuff