I'm following the Unicode - How to get the characters right? post.
The only issue I have is with JSONObject encoding (I'm using org.json lib).
The issue arises when I put a string like àòùè쀀, for example, in a JSONObject.
System.out.println(entry.getValue());
JSONObject temp = new JSONObject();
temp.put("values", entry.getValue();
System.out.println(temp.toString());
I obtain àòùè쀀 and {"values":"àòùèì\u20ac\u20ac"} instead of {"values":"àòùè쀀"}.
EDIT
By passing from an hashtable to a jsonObject, the extended utf-8 encoding is used. For example, the hashtable
{€èòàùì€ù=èòàù€ì, €òàèùì€=èòàù€ìç§$}
becomes the JSONObject
{"\u20acòàèùì\u20ac":"èòàù\u20acìç§$","\u20acèòàùì\u20acù":"èòàù\u20acì"}