title: Read special charatters ( æ ø å ) with Java from Oracle database
body: <p>i have a problem when reading special charatters from oracle database (use JDBC driver and glassfish tooplink).</p>
  
  <p>I store on database the name "GRØNLÅEN KJÆTIL" through WebService and, on database, the data are store correctly.</p>
  
  <p>But when i read this String, print on log file and convert this in byte array whit this code:</p>
  
  <pre><code> int pos = 0;
   byte[] msg=new byte[1024];
  
   String F = "F" + passenger.getName();
   logger.debug("Add " + F + " " + F.length());
   msg = addStringToArrayBytePlusSeparator(msg, F,pos);
  </code></pre>
  
  <p>..............</p>
  
  <pre><code>private byte[] addStringToArrayBytePlusSeparator(byte[] arrDest,String strToAdd,int destPosition)
      {
          System.arraycopy(strToAdd.getBytes(Charset.forName("ISO-8859-1")), 0, arrDest, destPosition, strToAdd.getBytes().length);
  
          arrDest = addSeparator(arrDest,destPosition+strToAdd.getBytes().length,1);
  
          return arrDest;
      }
  </code></pre>
  
  <p>1) In the log file there is:"Add FGRÃNLÃ              " (the name isn't correct and the F.length() are not printed).</p>
  
  <p>2) The code throw: 
  java.lang.ArrayIndexOutOfBoundsException
      at java.lang.System.arraycopy(Native Method)
      at it.edea.ebooking.business.chi.control.VingCardImpl.addStringToArrayBytePlusSeparator(Test.java:225).</p>
  
  <p>Any solution?</p>
  
  <p>Tanks</p>