# HG changeset patch # User casties # Date 1382344614 -7200 # Node ID d16da6e739ef240263c95573c474049a04c58e50 # Parent c57d80a649eaa69ebbbb92335e4be5cbdd25cdbf fix problem with utf8ify trying to encode ints. diff -r c57d80a649ea -r d16da6e739ef SrvTxtUtils.py --- a/SrvTxtUtils.py Thu Oct 17 16:25:39 2013 +0200 +++ b/SrvTxtUtils.py Mon Oct 21 10:36:54 2013 +0200 @@ -22,7 +22,7 @@ import xml.etree.ElementTree as ET -srvTxtUtilsVersion = "1.12.1" +srvTxtUtilsVersion = "1.12.2" map_months = {'en': [u"", u"January", @@ -84,8 +84,10 @@ return "" if isinstance(s, str): return s + elif isinstance(s, unicode): + return s.encode('utf-8') else: - return s.encode('utf-8') + return str(s) def getText(node, recursive=0): """returns all text content of a (etree) node and its subnodes"""