Nick Coghlan added the comment:

Last tweak, since the purpose is to fix the original incorrect decoding to 
latin-1, this should be defined as a decoding operation:

    def fix_decoding(data, encoding, errors="surrogateescape"):
        return data.encode("latin-1").decode(encoding, errors)

----------
title: Add wsgiref.util.fix_encoding -> Add wsgiref.util.fix_decoding

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue22264>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to