Ticket #4773: unicode_fix.diff

File unicode_fix.diff, 491 bytes (added by sime <simon@…>, 17 years ago)
  • django/utils/encoding.py

     
    3737        if hasattr(s, '__unicode__'):
    3838            s = unicode(s)
    3939        else:
    40             s = unicode(str(s), encoding, errors)
     40            s = unicode(smart_str(s), encoding, errors)
    4141    elif not isinstance(s, unicode):
    4242        s = unicode(s, encoding, errors)
    4343    return s
Back to Top