Skip to content

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

Open
dpgeorge wants to merge 2 commits into
micropython:masterfrom
dpgeorge:uaiohttpclient-fix-latin-encoding
Open

uaiohttpclient: Use "utf8" encoding instead of "latin-1".#1145
dpgeorge wants to merge 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.

dpgeorge added 2 commits July 28, 2026 23:05
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>
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