1 Reply Latest reply on Jun 2, 2005 3:39 PM by cbwilliams

    Problem with THAI character on Jboss-3.23 with RedHat Linux

    nandipinto

      Hi all,

      I'm deploying a J2EE application that has multi-language support on Jboss 3.2.3 on RedHat Linux 9.0 with JKD1.4.1_07
      I have problem transforming and displaying XML files that contain Thai character (MS874 encoding). It says encoding MS874 is not a supported encoding. I've tried to transform it to UTF-8 but the result was undiserable.

      Please advice on how to solve this problem

      regards,


      nandipinto.

        • 1. Re: Problem with THAI character on Jboss-3.23 with RedHat Li
          cbwilliams

          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