Beispiel #1
0
 def unicode(str, encoding):
     return wstring.decode(encoding, str).utf8()
Beispiel #2
0
 def to_xml_string(str,encoding):
     if string.lower(self._encoding) == 'utf-8':
         return str
     else:
         return wstring.decode(encoding,str).utf8()
Beispiel #3
0
 def unicode(str, encoding='US-ASCII'):
     """Create a UTF-8 string"""
     try:
         return wstring.decode(string.upper(encoding), str).utf8()
     except:
         return str
Beispiel #4
0
 def unicode(str, encoding='US-ASCII'):
     """Create a UTF-8 string"""
     try:
         return wstring.decode(string.upper(encoding), str).utf8()
     except:
         return str
Beispiel #5
0
 def unicode(str, encoding):
     return wstring.decode(encoding, str).utf8()
Beispiel #6
0
 def to_xml_string(str,encoding):
     if string.lower(self._encoding) == 'utf-8':
         return str
     else:
         return wstring.decode(encoding,str).utf8()