Ticket #3395: decode-before-unicode.2.patch
File decode-before-unicode.2.patch, 539 bytes (added by , 18 years ago) |
---|
-
django/newforms/util.py
10 10 if hasattr(s, '__unicode__'): 11 11 s = unicode(s) 12 12 else: 13 s = unicode(str(s) , settings.DEFAULT_CHARSET)13 s = unicode(str(s).decode(settings.DEFAULT_CHARSET), settings.DEFAULT_CHARSET) 14 14 elif not isinstance(s, unicode): 15 15 s = unicode(s, settings.DEFAULT_CHARSET) 16 16 return s