Ticket #5028: temporary_force_unicode_patch.patch
File temporary_force_unicode_patch.patch, 547 bytes (added by , 17 years ago) |
---|
-
encoding.py
39 39 else: 40 40 s = unicode(str(s), encoding, errors) 41 41 elif not isinstance(s, unicode): 42 s = unicode(s, encoding, errors) 42 try: 43 s = unicode(s, encoding, errors) 44 except UnicodeError: 45 s = unicode(s, 'latin-1', errors) 43 46 return s 44 47 45 48 def smart_str(s, encoding='utf-8', strings_only=False, errors='strict'):