2

In Liferay Portal 6.2 i have created a portlet that has language.properties file. The portlet.xml like this :

<resource-bundle>com.test.portlet.featuretest.content.Language</resource-bundle>

The language.properties reads:

no-customer-were-found=no customer
first-name=FIRST NAME
last-name=\u0646\u0627\u0645 \u062E\u0627\u0646\u0648\u0627\u062F\u06AF\u06CC

In the view.jsp there is somthing like this :

view.jsp

why utf characters not loaded. (??? ????????) but in the liferay 6.0.6 everything is true.

Any suggestions?

MWiesner
  • 8,868
  • 11
  • 36
  • 70
Habib Zare
  • 1,206
  • 8
  • 17

1 Answers1

0

I believe it was Liferay 6.1 where the default encoding for localization property files changed from the Java standard to UTF-8 - in other words your language files should just contain the unescaped UTF-8 encoded characters rather than the hard-to-read version that you're posting above.

Just convert them to the correct encoding, convince your IDE that it's fine to have UTF-8 encoded property files and you're set.

Olaf Kock
  • 46,930
  • 8
  • 59
  • 90