I request a JSON file from a server, apparently the file is sent with the wrong encoding header. Unfortunately I don't have the possibility to change the header, because I don't have access to the server.
The response contains the strings as Unicode codepoint, e.g. "u00c3u00a4". When I parse the result as JSON it converts to "?¤" expected would be "?".
I am loading the response with Axios, I have already tried to load and convert the response as ArrayBuffel but haven't found the right way yet.
What can I do to correct the encoding on the client side without any adjustments on the server?
example response:
{
"uid": "",
"title": "my name",
"gender": "2",
"address_title": "",
"address_firstname": "my",
"address_lastname": "name",
"address_zip": "99999",
"address_city": "xu00c3u00bcxx",
"address_street": "Bahn Strau00c3u0178e 1",
"address_name2": "",
"address_name3": "",
"phone": "5555",
"phone_emergency": "55555",
"fax": "",
"email": "mail@mail",
"internet": "",
"address_alternative_street": "",
"address_alternative_zip_city": "",
"job_description": "Gu00c3u00a4rtner",
"emergency_opening": "",
"emergency_opening2": "10 - 11 und 17 - 18 Uhr",
"emergency_description": "",
"latitude": "",
"longitude": ""
}
response headers
question from:
https://stackoverflow.com/questions/66060047/encoding-problem-at-request-with-json-file 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…