Ticket #3314: form_utils.diff
File form_utils.diff, 590 bytes (added by , 18 years ago) |
---|
-
www-libs/django/django/newforms/util.py
7 7 8 8 def smart_unicode(s): 9 9 if not isinstance(s, basestring): 10 s = unicode(str(s)) 10 if hasattr(s, '__unicode__'): 11 s = unicode(s) 12 else: 13 s = unicode(str(s), settings.DEFAULT_CHARSET) 11 14 elif not isinstance(s, unicode): 12 15 s = unicode(s, settings.DEFAULT_CHARSET) 13 16 return s