amin0704
(amin0704)
June 19, 2023, 10:07am
1
Hello everyone,
I have an issue when I want to display non-american characters such as βΓ©β on postman. When I compile the code that has to display these types of characters on my console, it works, but when I use this code as an api in Postman, the response displays β\u00e9β instead of βΓ©β.
I tried to change the Content-Type to application/json;charset=utf-8 , but nothing changed.
Thanks for your help !
When I send that using Postman Echo, it goes through fine.
But I can see in the URL in the console log that its automatically encoding it.
So what is actually sent is the following.
https://postman-echo.com/get?test=%C3%A9
Which is the same principle as the following.
let string = "Γ©";
console.log(string); // "Γ©"
const encoded = encodeURI(string);
console.log(encoded); // "%C3%A9"
console.log(decodeURI(encoded)); // "Γ©"
You might need to send the encoded value instead.
amin0704
(amin0704)
June 20, 2023, 10:54am
4
Hi, Iβm coming back to you,
The problem was just that, in order to print the result on postman, I used the json.dumps() method but if I donβt put ensure_ascii=False then it doesnβt convert non-american characters. I add this and now it works well.