I have been trying to make this work for a while.. driving me crazy.
When I try to send POST request to my django app with Hebrew text, it stores the Hebrew text as ???????
.
I thought it might be a problem in my postgres database, but its Encoding is UTF-8, and also, when I access the table entries manually, I can change the text to Hebrew and its fine.
What am I doing wrong? How can send POST requests with Hebrew text and store it successfully in the DB??
UPDATE: SOLVED
Apparently, my mistake was so simple and annoying...
In the android app, when you set the params, I did this:
se = new StringEntity(obj.toString());
When I changed my code and added the UTF_8
, it solved the issue:
se = new StringEntity(obj.toString(), HTTP.UTF_8);
Just needed to add the UTF_8
Encoding..