2 Replies Latest reply on Jul 22, 2010 9:01 AM by 843810

    Character-encoding problem (Czech)

      Hi all,

      We are working on giving support to Czech language in some modules in our application and we are getting problems. We need to add Czech text in some keys inside file.properties for English language.

      We have used the native2ascii tool to convert property file from UTF-8:
      native2ascci -encoding UTF-8 spa_en_utf8.properties spa_en_properties
      When we run the application it display the most of characters correct, but some characters like č or ů we get only questionmarks (??).

      We are using java 1.4 - SunOS 5.9 – Weblogic 8.1 and we set the default encoding
      file.encoding = ISO8859-1.

      Any idea about what we are doing wrong? Thanks in advance.
        • 1. Re: Character-encoding problem (Czech)
          When your application displays the data from the properties file, it displays question marks instead of characters which aren't in Latin-1? Then either there are question marks in the properties file (which you could easily verify) or the application is doing something wrong with encodings.
          • 2. Re: Character-encoding problem (Czech)
            Yes, that's right. The key contains unicode, for example:
            But when we run the application it displays Vá?ený instead of Vážený.

            This method get access to the message resources:
            public static String getMensaje(Locale locale, String bundle, String clave) {
               String msg = null;
               MessageResources messages = MessageResources.getMessageResources(bundle);
               msg = messages.getMessage(locale, clave);
               return msg;
            We try for set encoding UTF-8 for properties file and then everything works fine. Is this wrong?