You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally posted by mxav1111 April 23, 2024
Hi team
I searched and couldn't find any open issue around this.
Encountered an issue while working on small project that involves UTF-8 double byte character set. In this specific case, it happens to be Hindi (Indian Language).
When filename is in hindi language , such as :- ब्रह्मवर्चसकीध्यानधारणा.txt, following error appears in log : -
=====
File "/home/pta/.pyenv/versions/3.12.2/envs/pyenv_flet1/lib/python3.12/site-packages/starlette/responses.py", line 297, in init
self.init_headers(headers)
File "/home/pta/.pyenv/versions/3.12.2/envs/pyenv_flet1/lib/python3.12/site-packages/starlette/responses.py", line 58, in init_headers
(k.lower().encode("latin-1"), v.encode("latin-1"))
^^^^^^^^^^^^^^^^^^^
Changed responses.py to : -
k.lower().encode("utf-8"), v.encode("utf-8"))
Thereafter Error went away and file was downloaded with no issues any more.
Important
We're using Polar.sh so you can upvote and help fund this issue.
We receive the funding once the issue is completed & confirmed by you.
Thank you in advance for helping prioritize & fund our backlog.
This discussion was converted from issue #2584 on May 06, 2024 11:45.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Discussed in #2579
Originally posted by mxav1111 April 23, 2024
Hi team
I searched and couldn't find any open issue around this.
Encountered an issue while working on small project that involves UTF-8 double byte character set. In this specific case, it happens to be Hindi (Indian Language).
When filename is in hindi language , such as :- ब्रह्मवर्चसकीध्यानधारणा.txt, following error appears in log : -
=====
File "/home/pta/.pyenv/versions/3.12.2/envs/pyenv_flet1/lib/python3.12/site-packages/starlette/responses.py", line 297, in init
self.init_headers(headers)
File "/home/pta/.pyenv/versions/3.12.2/envs/pyenv_flet1/lib/python3.12/site-packages/starlette/responses.py", line 58, in init_headers
(k.lower().encode("latin-1"), v.encode("latin-1"))
^^^^^^^^^^^^^^^^^^^
Changed responses.py to : -
k.lower().encode("utf-8"), v.encode("utf-8"))
Thereafter Error went away and file was downloaded with no issues any more.
Important
Beta Was this translation helpful? Give feedback.
All reactions