I am currently using a code (best answer on a question) I found here everything works properly until you give it a japanese String
input.
I thought the UTF-8
charset would do the trick but I am not really sure what part of the code does not allow japanese characters to be serialized.
For example if I serialize something basic like "ひらがな"
it will output garbage characters.
What I am doing is something like
String serialized = serialize("ひらがな");
String deserialized = deserialize(serialized, new TypeToken<String>() {}.getType());
System.out.println(deserialized);
But I am getting a garbage deserialized
.
Can someone please shed some light? Thank you.