Changeset 628:447251b5af65 in documentViewer
- Timestamp:
- Feb 11, 2015, 4:18:23 PM (10 years ago)
- Branch:
- default
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
SrvTxtUtils.py
r623 r628 23 23 import xml.etree.ElementTree as ET 24 24 25 srvTxtUtilsVersion = "1.13 "25 srvTxtUtilsVersion = "1.13.1" 26 26 27 27 map_months = {'en': [u"", … … 95 95 except: 96 96 return s.decode('latin-1') 97 elif isinstance(s, unicode): 98 return s 97 99 else: 98 return s100 return unicode(s) 99 101 100 102 def utf8ify(s): … … 103 105 if not s: 104 106 return "" 105 if isinstance(s, str): 107 if isinstance(s, unicode): 108 return s.encode('utf-8') 109 elif isinstance(s, str): 106 110 return s 107 111 else: 108 return s .encode('utf-8')112 return str(s) 109 113 110 114
Note: See TracChangeset
for help on using the changeset viewer.