Currently I'm using google place autocomplete library. Right after user has picked up some address from autocomplete results, I post the form data through <form method="POST">
tag to the server. I just post the address itself from the text-input field. Server is on Java. So, server gets the non-latin symbols in incorect encoding.
For example,
1. In case of New York, IA, United States
response from server is correct New York, IA, United States
2. In case of Deutch umlauts like Auf der Schmelz, Wien, Österreich
response from server is incorrect Auf der Schmelz, Wien, Ãsterreich
3. Same for umlauts: Auf'm Hennekamp, Düsseldorf, Deutschland
result is Auf'm Hennekamp, Düsseldorf, Deutschland
4. For cyrillic text like Париж, Франция
result is the following ÐаÑиж, ФÑанÑиÑ
Using online decoder like http://ift.tt/URnPbT I've recieved the following results for the 4th case: ISO-8859-1 → UTF-8
But I'm not sure Google's response is under ISO-8859-1 encoding.
Also, this is the screen-shot from the post request to the server I've sent: http://ift.tt/1wpTYfG
As you can see, cyrillic text sends as URL-encoded string.
I would wonder if anyone will help me to figure out with the root of this issue.
Aucun commentaire:
Enregistrer un commentaire