title: encoding jboss 7
body: <p>I tried all possible answers <a href="https://stackoverflow.com/questions/10228764/jboss-7-encoding-not-working-as-expected">this</a> and <a href="https://stackoverflow.com/questions/10226018/jboss-encoding-utf-8">this</a> , but it didn't worked for me. Now writing the question.</p>
  
  <pre><code>private String convertValue(String val){
      System.out.println("convert input:" + val);
      String res = "";
      StringTokenizer st = new StringTokenizer(val,",");
      while(st.hasMoreTokens()){
          String token = st.nextToken();
          if (token.matches("([0-9]*)")) {
              char c = (char)Integer.parseInt(token);
              res+=c;
          }else{
              res+=token;
          }
      }
      System.out.println("convert output:" + res);
      return res;
  }
  </code></pre>
  
  <p>When running out of the jboss 7 it gives:</p>
  
  <pre><code>convert input:61,1087,1088,1080,1074,1077,1090
  convert output:=привет
  </code></pre>
  
  <p>Running in the jboss 7 by action:</p>
  
  <pre><code>convert input:61,1087,1088,1080,1074,1077,1090
  convert output:=??????
  </code></pre>
  
  <p>Why it is not working properly?</p>
  
  <p>My standalone.xml:</p>
  
  <pre><code> &lt;extension module="org.jboss.as.weld"/&gt;
  &lt;/extensions&gt;
  
  &lt;system-properties&gt;
      &lt;property name="org.apache.catalina.connector.URI_ENCODING" value="UTF-8"/&gt;
      &lt;property name="org.apache.catalina.connector.USE_BODY_ENCODING_FOR_QUERY_STRING" value="true"/&gt;
  &lt;/system-properties&gt;
  </code></pre>
  
  <p>added java opts(-Dfile.encoding=UTF-8):</p>
  
  <pre><code>convert input:61,1087,1088,1080,1074,1077,1090
  convert output:=–ø—Ä–∏–≤–µ—Ç
  </code></pre>
  
  <p>EDIT 1: My environment:</p>
  
  <pre><code>Mac OS X Version 10.7.5
  JBoss 7.1.1.Final
  java version "1.6.0_33"
  Java(TM) SE Runtime Environment (build 1.6.0_33-b03-424-11M3720)
  Java HotSpot(TM) 64-Bit Server VM (build 20.8-b03-424, mixed mode)
  </code></pre>
  
  <p>EDIT 2: Code snippet above working in javax.enterprise.context.RequestScoped back bean controller when pressing button from JSF page.</p>