def unicode(str, encoding='US-ASCII'): """Create a UTF-8 string""" try: return wstring.decode(string.upper(encoding), str).utf8() except: return str
def to_xml_string(str, encoding): if string.lower(self._encoding) == 'utf-8': return str else: return wstring.decode(encoding, str).utf8()
def unicode(str, encoding): return wstring.decode(encoding, str).utf8()
def to_xml_string(str,encoding): if string.lower(self._encoding) == 'utf-8': return str else: return wstring.decode(encoding,str).utf8()