I have a property file with the following key and value:
elsi.log.status.1 = Keine Änderungen
But the character Ä is not properly displayed on my webpage. The output is �
But if i use the faces-config and then directly display a message from the xhtml the message is displayed same as in the property file
This is the method used to get values from the propertyfile in java. When I debug the value is allready wrong here (bundle.getString(key) returns Keine �nderungen)
public static String getString(String key) {
try {
Locale locale = CurrentEnvironment.getLocale();
ResourceBundle bundle = ResourceBundle.getBundle(BUNDLE_NAME, locale);
if (bundle != null) {
return bundle.getString(key);
}
} catch (MissingResourceException e) {
return '!' + key + '!';
}
return '!' + key + '!';
}
Direct output with xhtml works
<h:outputText value="#{messages.elsi_copyright}" />
I also noticed that replacing the chars in the propertyfile with hexcodes helped but i want to know if it is possible to do this otherwise.
Thanks for your help