Changeset 1142

Show
Ignore:
Timestamp:
07/27/07 21:57:34 (6 years ago)
Author:
boltrix
Message:

More test on I18N

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/umitCore/I18N.py

    r1141 r1142  
    2626LC_ALL = locale.setlocale(locale.LC_ALL, '') 
    2727LANG, ENC = locale.getdefaultlocale() 
    28 ERRORS = "replace" 
     28ERRORS = "strict" 
    2929 
    3030# If not correct locale could be retrieved, set en_US.utf8 as default 
     
    5656    """ 
    5757    log.debug(">>> Converting '%s' from '%s' to unicode" % (string, ENC)) 
    58     string = string.decode(ENC, ERRORS) 
     58    string = unicode(string, ENC, ERRORS) 
    5959    log.debug(">>> Converted to: '%s'" % string) 
    6060