Expand my Community achievements bar.

Translated text is replaced with ??? in java

Avatar

Level 2

I have a requirement to retrieve list of AEM pages and its properties. So I'm doing it through SQL query in java to retrieve. Everything is coming fine except a single property which has translated text. Property text is always been replaced with ??? instead of the language text. That property is a richtext field in AEM dialog.

Do I need to add something in query to retrieve the translated(language) text as it is?

Please suggest

Thanks in advance..

5 Replies

Avatar

Community Advisor

Hi,

This could be issue because of encoding. Try to put UTF or another format forget against required property

InvalidQueryException on XPath Query with Numeric Node Name



Arun Patidar

Avatar

Level 2

While encoding Im getting value like this '_x003c_p_x003e_????_x3001_?????_x003c__x002f_p_x003e__x000d__x000a_'

Avatar

Community Advisor

Hi,

It seems in java when you are reading property value it is not in UTF-8.

You need to read value in UTF-8 and need to encode so that browser can render.



Arun Patidar

Avatar

Level 2

In author and publish its coming fine. Only in dispatcher , the Japanese text is getting replaced with special characters. Is there something I need to add in dispatcher file?