Changeset 553:2fe04b61ed95 in documentViewer
- Timestamp:
- Sep 24, 2012, 2:24:22 PM (12 years ago)
- Branch:
- default
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
SrvTxtUtils.py
r546 r553 12 12 13 13 14 srvTxtUtilsVersion = "1.5 "14 srvTxtUtilsVersion = "1.5.1" 15 15 16 16 def getInt(number, default=0): … … 38 38 return s.decode('latin-1') 39 39 else: 40 return s40 return unicode(s) 41 41 42 42 def utf8ify(s): … … 45 45 if not s: 46 46 return "" 47 if isinstance(s, str):48 return s 47 if isinstance(s, unicode): 48 return s.encode('utf-8') 49 49 else: 50 return s .encode('utf-8')50 return str(s) 51 51 52 52 def getText(node, recursive=0):
Note: See TracChangeset
for help on using the changeset viewer.