0 Replies Latest reply on Feb 12, 2016 12:49 AM by Dheepan H

    Cyrillic characters are not working in jboss eap 6.3

    Dheepan H Newbie

      Hi,

       

          We are replicating a scenario in our local AIX/windows machine with cyrillic inputs. When the Cyrillic character inputted using an java program using jboss eap 6.3 ,it is reached as double byte character is been noticed in the logs(file-log).The same scenario is tried with jboss 5.1 works fine.

       

      The code page for cyrillic is been set in the jboss eap (admin console window) as ISO-8859-5 & ISO-8859-1 and also the same in jboss 5.1(run.conf).

       

      At jvm with UTF-8, I wrote a program to print the byte with Cyrillic charset,


      Source code snippet:

       

      public void writeTo(OutputStream os) throws IOException{

        FileOutStreamUtil.write("default charset ********************** "  + Charset.defaultCharset());

        FileOutStreamUtil.write("777777777777777777 default " + new String(backingArray));

        FileOutStreamUtil.write("777777777777777777 default-check " + new String("ИВАН"));

        FileOutStreamUtil.write("888888888888888888 Cyrilic " + new String(backingArray, "ISO-8859-5"));

        FileOutStreamUtil.write("888888888888888888 Cyrilic-check " + new String("ИВАН".getBytes(), "ISO-8859-5"));

        FileOutStreamUtil.write("999999999999999999 default " + Arrays.toString(new String(backingArray).getBytes()));

        FileOutStreamUtil.write("999999999999999999 default-check " + Arrays.toString(new String("ИВАН").getBytes()));

        FileOutStreamUtil.write("101010101010101010 Cyrilic " + Arrays.toString(new String(backingArray, "ISO-8859-5").getBytes()));

        FileOutStreamUtil.write("101010101010101010 Cyrilic-check " + Arrays.toString(new String("ИВАН".getBytes(), "ISO-8859-5").getBytes()));

          byte[] temp = new String(backingArray,"ISO-8859-5").getBytes();

          os.write(backingArray, getStartOffset(), length());

          clear();

        }

       

      The below log traces in jboss eap and jboss 5.1 shows the double byte characters as the cyrillic inputted. 

       

      jboss eap 6.3 log trace:

       

       

      **********333333333333333333********************************default charset ********************** ISO-8859-1777777777777777777 default                                                                      

      ????888888888888888888 Cyrilic                                                                                                  

      ????999999999999999999 default [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,

      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]999999999999999999 default-check [63, 63, 63, 63]101010101010101010 Cyrilic [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,

      43, 91, 76, 73, 0, 0, 0, 15, 73, 0, 0, 0, 2, 76, 73, 0, 0, 0, 111, 73, 0, 0, 0, 0, 115, 0, 0, 59, 115, 0, 0, 59, 115, 0, 0, 59, 73, 0, 0, 0, 0, 59, 59, 93, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,

      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]101010101010101010 Cyrilic-check [63, 63, 63, 63]1111111111

       

       

      jboss 5.1 log trace:

       

      **********333333333333333333********************************default charset ********************** ISO-8859-5777777777777777777 default

      777777777777777777 default-check

      ¸²°½ 888888888888888888 Cyrilic

      ¸²°½999999999999999999 default [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,

      0, 0, 0, 0, 0, 0, 0, 0, 43, 91, 76, 73, 0, 0, 0, 15, 73, 0, 0, 0, 2, 76, 73, 0, 0, 0, 111, 73, 0, 0, 0, 0, 115, 0, 0, 59, 115, 0, 0, 59, 115, 0, 0, 59, 73, 0, 0, 0, 0, 59, 59, 93, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,

      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]999999999999999999 default-check [-72, -78, -80, -67]101010101010101010 Cyrilic [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,

      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 43, 91, 76, 73, 0, 0, 0, 15, 73, 0, 0, 0, 2, 76, 73, 0, 0, 0, 111, 73, 0, 0, 0, 0, 115, 0, 0, 59, 115, 0, 0, 59, 115, 0, 0, 59, 73, 0, 0, 0, 0, 59, 59, 93, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,

      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]101010101010101010 Cyrilic-check [-72, -78, -80, -67]1111111111

       

      Also i had attached the log files for reference, kindly find with this discussion and provide a solution to make the inputted cyrillic character work in jboss 6.3.

       

      Thanks in advance.