Ticket #3395: decode-before-unicode.2.patch

File decode-before-unicode.2.patch, 539 bytes (added by Øyvind Saltvik <oyvind.saltvik@…>, 8 years ago)

Oops, this helped me

  • django/newforms/util.py

     
    1010        if hasattr(s, '__unicode__'):
    1111            s = unicode(s)
    1212        else:
    13             s = unicode(str(s), settings.DEFAULT_CHARSET)
     13            s = unicode(str(s).decode(settings.DEFAULT_CHARSET), settings.DEFAULT_CHARSET)
    1414    elif not isinstance(s, unicode):
    1515        s = unicode(s, settings.DEFAULT_CHARSET)
    1616    return s
Back to Top