Hi folks, i would like to include Chinese characters into a JSON string which is in a REST resource. However, all Chinese characters are converted to Unicode somehow when the JSON string is passed back to client. May i know how to retain Chinese characters? Thank you in advance.
Unicode is just a way to represent text contents as bytes. It’s perfectly valid to represent Chinese characters. If you like to use some other encoding, you can investegate whether it’s possible to let the framework deliver the reply in that encoding. Or you can re-encode the contents yourself.
Check with your client, what encoding they expect with these Chinese content.
it can be: GB2312, GB18030 or Big5 etc.
Then make the encoding conversion (String to Bytes) before sending to the client.