Ticket #28487: encoding.diff

File encoding.diff, 435 bytes (added by Jacek Kałucki, 5 years ago)
  • encoding.

    old new  
    121121        if encoding == 'utf-8':
    122122            return s
    123123        else:
    124             return s.decode('utf-8', errors).encode(encoding, errors)
     124            return s.decode(encoding, errors).encode('utf-8', errors)
    125125    if strings_only and is_protected_type(s):
    126126        return s
    127127    if isinstance(s, six.memoryview):
Back to Top