Code

Ticket #3403: patch.diff

File patch.diff, 452 bytes (added by boobsd@…, 7 years ago)
Line 
1Index: django/newforms/util.py
2===================================================================
3--- django/newforms/util.py     (revision 4451)
4+++ django/newforms/util.py     (working copy)
5@@ -7,7 +7,7 @@
6 
7 def smart_unicode(s):
8     if not isinstance(s, basestring):
9-        s = unicode(str(s))
10+        s = unicode(str(s), settings.DEFAULT_CHARSET)
11     elif not isinstance(s, unicode):
12         s = unicode(s, settings.DEFAULT_CHARSET)
13     return s