Ticket #3314: util.diff
| File util.diff, 0.6 kB (added by nesh <nesh [at] studioquattro [dot] co [dot] yu>, 2 years ago) |
|---|
-
/www-libs/django/django/newforms/util.py
old new 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
