fix: change encoding to add support for more characters

This commit is contained in:
sokumon 2025-12-08 11:29:16 +05:30
parent d038cdec5c
commit 581d5891c5

View file

@ -559,7 +559,7 @@ def build_response(path, data, http_status_code, headers: dict | None = None):
if headers:
for key, val in headers.items():
response.headers[key] = cstr(cstr(val).encode("ascii", errors="xmlcharrefreplace"))
response.headers[key] = cstr(cstr(val).encode("utf-8", errors="xmlcharrefreplace"))
return response