-
1. Re: Problem with THAI character on Jboss-3.23 with RedHat Li
cbwilliams Jun 2, 2005 3:39 PM (in response to nandipinto)I am having a similar issue. I've got my page encoding set to TIS-620 in the JSP Source and I'm loading my resource bundle as TIS-620 encoded byte streams:
public class Messages {
private static final String BUNDLE_NAME = "com.epcsolutions.thingsnet.web.forms.messages";//$NON-NLS-1$
private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle(BUNDLE_NAME, new Locale("th", ""));
private Messages() {
}
public static String getString(String key) {
// TODO Auto-generated method stub
try {
return new String(RESOURCE_BUNDLE.getString(key).getBytes(), "TIS620");
} catch (UnsupportedEncodingException e) {
return '!' + key + '!';
} catch (MissingResourceException e) {
return '!' + key + '!';
}
}
}
When the resources are loaded, I get a bunch of Thai characters (more than what is in the resource bundle - properties file) intersperced with '?'s.
The strings in the properties file are returned as messages by a bean that gets invoked from a JSP.
Note that the resource bundle loading and display of Thai characters works properly in a SWT-based java application.
What am I doing wrong here?
Thanks in advance,
Chuck