Hi All,
I have Chinese content in node property.
When I am reading this content using node.getProperty("text").getString()
or
ValueMap.get("text").toString()
Both these methods are returning non readable characters sequence like ??????
Could anyone help how to read Chine text in AEM. However English text is working fine.
Any pointers highly appreciated.
Thanks,
Pradeep
Solved! Go to Solution.
Can you try with https://commons.apache.org/proper/commons-text/javadocs/api-release/org/apache/commons/text/StringEs... api to unscape characters .
Can you try with https://commons.apache.org/proper/commons-text/javadocs/api-release/org/apache/commons/text/StringEs... api to unscape characters .
@pradeepdubey hi - You need to use character encoding in that case.
Also note, you will always see ??? when printing into logs - please try to write it on response for testing.
Thanks,
Milind
I started and checked AEM in debug mode, text is in Chinese language, however log is printing invalid characters.
When I copy paste the text on editor it is in Chinese only. Not sure why AEM node and resource API is not returning actual text.
Could you share any code/API which ensure same text is getting read and printed in logs?
Thanks,
Pradeep