Reputation: 12631
I am using GWT. i implemented internationalization to support spanish language. but spanish chars are not displayed propertly. Ex: Teléfono Buscar is displayed as .
(see some junk char after Tel). i am using IE browser.
Do i need to configure any further settings? Thanks!
Upvotes: 2
Views: 2879
Reputation: 62623
I suspect this may be due to the fact that your editor isn't using UTF-8
encoding.
If you're using Eclipse, you can configure it to use UTF-8
for *.properties
by going to Window > Preferences > General > Content Types
.
Just make sure you change the Default encoding
value to UTF-8
as shown below.
There will be a similar setting for any text editor, including vi
.
Upvotes: 2
Reputation: 13061
Since your strings are coming from a properties file, your ResourceBundle is probably an instance of PropertyResourceBundle, which creates an empty instance of java.util.Properties and then populates the instance by loading the properties file via one of the "load" methods. PropertyResourceBundle has two constructors, one which takes an InputStream and one which takes a Reader. The constructors simply call the corresponding "load" method.
Note that the "load" method that takes an InputStream assumes the character encoding of the properties file is ISO 8859-1 (Latin1). You can solve this problem in two ways:
Upvotes: 1