Ticket #3314: util.diff
File util.diff, 591 bytes (added by , 18 years ago) |
---|
-
www-libs/django/django/newforms/util.py
2 2 3 3 def smart_unicode(s): 4 4 if not isinstance(s, basestring): 5 s = unicode(str(s)) 5 try: 6 s = unicode(str(s)) 7 except UnicodeDecodeError: 8 s = unicode(str(s), settings.DEFAULT_CHARSET) 6 9 elif not isinstance(s, unicode): 7 10 s = unicode(s, settings.DEFAULT_CHARSET) 8 11 return s