I need to send Thai characters as part of a json REST request which will be sent to a SOAP webservice.
This is the json request:
{
"thaiDesc": "ฃ ขวด"
}
When I log this string on the server side, it is getting converted to question mark:
utf8EncodedString: ? ???
This is the code i used to encode the thai characters:
String rawString =request.getThaiDesc();
byte[] bytes = rawString.getBytes(StandardCharsets.UTF_8);
String utf8EncodedString = new String(bytes, StandardCharsets.UTF_8);
In the SOAP Webservice Request, the UTF-8 HEX is being sent instead:
<TH_DESC>[0xe0][0xb8][0x83] [0xe0][0xb8][0x82][0xe0][0xb8][0xa7][0xe0][0xb8][0x94]</TH_DESC>
Can somebody please advise how to send the original thai characters to the SOAP Webservice instead?