Ignore:
Timestamp:
12/27/12 08:04:59 (11 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
default
Phase:
public
Message:

The exception strings are converted from UTF-8 to unicode for proper logging (re #170)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mlx/util.py

    r373 r401  
    33import time
    44import sys
     5import codecs
    56
    67#------------------------------------------------------------------------------
     
    165166
    166167secondaryInstallation="secondary" in sys.argv
     168
     169#------------------------------------------------------------------------------
     170
     171_utf8decoder = codecs.getdecoder("utf-8")
     172
     173def utf2unicode(text):
     174    """Convert the given text from UTF-8 encoding to unicode."""
     175    return unicode(_utf8decoder(text)[0])
Note: See TracChangeset for help on using the changeset viewer.