Skip to content

Default text encoding to utf8 instead of (very) legacy latin-1#8126

Open
emaheuxPEREN wants to merge 1 commit intomitmproxy:mainfrom
emaheuxPEREN:utf8_encoding_by_default
Open

Default text encoding to utf8 instead of (very) legacy latin-1#8126
emaheuxPEREN wants to merge 1 commit intomitmproxy:mainfrom
emaheuxPEREN:utf8_encoding_by_default

Conversation

@emaheuxPEREN
Copy link
Copy Markdown

@emaheuxPEREN emaheuxPEREN commented Mar 12, 2026

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.

@emaheuxPEREN emaheuxPEREN force-pushed the utf8_encoding_by_default branch 5 times, most recently from 37da891 to 1a6879b Compare March 13, 2026 09:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant