Starlette: Problem with formdata in utf-8, with non latinic symbol

Created on 7 Mar 2019  路  3Comments  路  Source: encode/starlette

version starlette is __version__ = "0.11.3"

in formparsers.py in line 218 following code => items.append((field_name, data.decode("latin-1")))
need change to => items.append((field_name, data.decode("utf-8")))

Because, for example, the data in the Russian language is displayed as a scribble.
I'm sure there's a more elegant solution.

bug

Most helpful comment

Released as 0.12.5

All 3 comments

Looks like a valid issue, yup. We should probably be using whatever charset is present in the Content-Type header.

I also have this problem when try uploading file in html form with fastapi. I hope it can be fixed soon.

Released as 0.12.5

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tomchristie picture tomchristie  路  5Comments

hyperknot picture hyperknot  路  6Comments

DrPyser picture DrPyser  路  6Comments

jordic picture jordic  路  6Comments

Immortalin picture Immortalin  路  3Comments