Changeset 3310 for pykota/trunk/pykota/utils.py
- Timestamp:
- 01/30/08 23:16:51 (16 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/pykota/utils.py
r3298 r3310 26 26 import locale 27 27 import gettext 28 from types import UnicodeType 28 29 29 30 def initlocale(lang="", cset=None) : … … 94 95 """ 95 96 if text is not None : 96 return text.decode("UTF-8", "replace") 97 if not isinstance(text, UnicodeType) : 98 return text.decode("UTF-8", "replace") 99 else : 100 # MySQL already returns unicode objects 101 return text 97 102 else : 98 103 return None