I need your help in displaying some Arabic text which is stored in a variable in the xhtml page. I have configured my project in jdeveloper to include UTF-8 in the properties and the Arabic text is displayed correctly. I have a variable called bankName and it has the unicode value which is :
String bankName = "\u0627\u0644\u0628\u0646\u0643 \u0627\u0644\u0645\u062a\u062d\u062f";
in the xhtml when I am printing the variable output <h:outputText value="#{hrd.bankName}" style="font-weight:bold" />
, the Arabic text is showing properly "البنك المتحد"
, however the same value of the unicode is stored in a database field and I am retrieving the value of it from the below code:
String bankName=result.getString("bank_name_arabic").trim();
The xhtml will display the Arabic text as a text:
\u0627\u0644\u0628\u0646\u0643 \u0627\u0644\u0645\u062a\u062d\u062f
in the xhtml page and will not give the value of it in Arabic.
So how can I achieve this.