Changeset 787:7fa0ff7749c5
- Timestamp:
- 06/16/16 17:42:51 (9 years ago)
- Branch:
- default
- Phase:
- public
- transplant_source:
- d¸À¥À¼«LRÿìc,s1etÑ
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/util.py
r401 r784 170 170 171 171 _utf8decoder = codecs.getdecoder("utf-8") 172 _latin2decoder = codecs.getdecoder("iso8859-2") 172 173 173 174 def utf2unicode(text): 174 175 """Convert the given text from UTF-8 encoding to unicode.""" 175 return unicode(_utf8decoder(text)[0]) 176 try: 177 return unicode(_utf8decoder(text)[0]) 178 except: 179 try: 180 return unicode(_latin2decoder(text)[0]) 181 except: 182 return unicode(list(text))
Note:
See TracChangeset
for help on using the changeset viewer.