Post UTF-8 encoded data to server loses certain characters

After much research and attempts to make things working, I finally found a solution for the problem, that is a simple addition to existing code. Solution was to use parameter “UTF-8” in the UrlEncodedFormEntity class constructor:

form = new UrlEncodedFormEntity(nameValuePairs,"UTF-8");

After this change, characters were encoded and delivered properly to the server side.

Leave a Comment