I have some characters from the Unicode Extension B Chinese/Japanese/Korean set in my XML:
𠀀𠀁𠀂𠀃𠀄𪛔𪛕𪛖
But when I use streamReader.getText() it returns:
ࠀ
Does anyone know if Java's XMLStreamReader's encoding scheme for unicode characters can be changed?
It works with common East Asian characters, just not with the ones in Unicode Extension B.
when create XML Stream Reader, you can specify the encoding as UTF-8. Like the API below
abstract XMLStreamReader createXMLStreamReader(InputStream stream, String encoding)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With