0

I am using internationalization in my jsf web application in Eclipse. I am using resource-bundle and reading from Lang.properties file using <f:loadBundle> tag. But when I start the server, for the first time, only the English language is displayed properly and letters of other languages are displayed as question marks. Once I refresh the page, everything is displayed properly.

I know that question marks are displayed in internationalization when jsf doesn't find the letters to display.

But I have put the key-value pairs in Lang.properties from where it should be able to read without any problem.

What should I do to make it read the Unicode letters for the first time also ? Any help is appreciated.

A_J
  • 977
  • 4
  • 16
  • 44

1 Answers1

0
  1. Make sure that your bundle files are saved in utf-8 encoding.
  2. Your pages should have a meta http-equiv on top, as in :

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    
  3. Then take a look at this question and its answer. I always found the web filter solution to be 100% sure thing.

Community
  • 1
  • 1
chrisl08
  • 1,658
  • 1
  • 15
  • 24
  • 1
    Why is this answer accepted? None of this all solves the problem described by the OP. – BalusC Oct 04 '15 at 09:18
  • @BalusC, My jsp pages had charset and pageEncoding as ISO-8859-1. When I changed it to utf-8, it worked fine. – A_J Oct 04 '15 at 11:16
  • @chrisl08, but why was the problem happening only for the very first time when I start the server ? Once I refresh the page, everything is displayed properly. – A_J Oct 04 '15 at 11:25
  • That wasn't covered by the answer. – BalusC Oct 04 '15 at 12:42