Skip to content

uaiohttpclient: Use "utf8" encoding instead of "latin-1". - #1145

Merged
dpgeorge merged 2 commits into
micropython:masterfrom
dpgeorge:uaiohttpclient-fix-latin-encoding
Aug 17, 2026
Merged

uaiohttpclient: Use "utf8" encoding instead of "latin-1".#1145
dpgeorge merged 2 commits into
micropython:masterfrom
dpgeorge:uaiohttpclient-fix-latin-encoding

Conversation

@dpgeorge

Copy link
Copy Markdown
Member

Summary

MicroPython now validates the encoding argument to encode/decode, and "latin-1" is not supported. So use "utf8" instead (which has the same behaviour as when MicroPython did not validate the encoding and silently passed it through using utf8).

Testing

Added a unittest which covers these changes and runs under CI. It failed prior to the fix here.

Generative AI

I did not use generative AI tools when creating this PR.

MicroPython now validates the encoding argument to encode/decode, and
"latin-1" is not supported.  So use "utf8" instead (which has the same
behaviour as when MicroPython did not validate the encoding and silently
passed it through using utf8).

Signed-off-by: Damien George <damien@micropython.org>
Signed-off-by: Damien George <damien@micropython.org>
@dpgeorge
dpgeorge force-pushed the uaiohttpclient-fix-latin-encoding branch from c992f70 to 585e82e Compare August 17, 2026 12:09
@dpgeorge
dpgeorge merged commit 585e82e into micropython:master Aug 17, 2026
5 checks passed
@dpgeorge
dpgeorge deleted the uaiohttpclient-fix-latin-encoding branch August 17, 2026 12:11
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