Translated text is replaced with ??? in java

Avatar

Avatar

Vijay_Manoharan

Avatar

Vijay_Manoharan

Vijay_Manoharan

10-09-2018

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..

Replies

Avatar

Avatar

Arun_Patidar

MVP

Total Posts

3.1K

Likes

1.2K

Correct Reply

879

Avatar

Arun_Patidar

MVP

Total Posts

3.1K

Likes

1.2K

Correct Reply

879
Arun_Patidar
MVP

10-09-2018

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

Avatar

Avatar

Vijay_Manoharan

Avatar

Vijay_Manoharan

Vijay_Manoharan

10-09-2018

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

Avatar

Avatar

Arun_Patidar

MVP

Total Posts

3.1K

Likes

1.2K

Correct Reply

879

Avatar

Arun_Patidar

MVP

Total Posts

3.1K

Likes

1.2K

Correct Reply

879
Arun_Patidar
MVP

10-09-2018

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.

Avatar

Avatar

Vijay_Manoharan

Avatar

Vijay_Manoharan

Vijay_Manoharan

14-09-2018

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?