Default text encoding to utf8 instead of (very) legacy latin-1 by emaheuxPEREN · Pull Request #8126 · mitmproxy/mitmproxy

Description

In infer_content_encoding, we set the fallback encoding to the UTF-8 standard instead of the (very) legacy Latin-1 encoding.

As a consequence, get_text() outputs (and thus HAR dumps) may differ from previous version, advocating for more than a patch release.

(Note that to reach full coverage I had to perform a mini-refact in mitmproxy.io.har -> extract a little untested snippet into an unitary testable function)

Checklist

  • I have updated tests where applicable.
  • I have added an entry to the CHANGELOG.