diff --git a/frappe/website/utils.py b/frappe/website/utils.py index 5dca169bc0..7ea118824a 100644 --- a/frappe/website/utils.py +++ b/frappe/website/utils.py @@ -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