title: android java character different from non-android java
body: <p>i have this RandomAccessFile object that reads bytes from a file and stores them into a byte array. they should compose a hebrew letter string.
  if i debug them in JAVA on a desktop, then for 4 bytes in hex i get, for example:</p>
  
  <pre><code>data[0]=E7
  data[1]=FA
  data[2]=E5
  data[3]=EC
  </code></pre>
  
  <p>(so, 1 byte length each which makes sense)</p>
  
  <p>when i construct a String str from them i get:</p>
  
  <pre><code>str[0]=\u05D7
  str[1]=\u05EA
  str[2]=\u05D5
  str[3]=\u05DC
  </code></pre>
  
  <p>which are the correct unicoded hebrew letters and the string print out just fine. are they 2 bytes length each?</p>
  
  <p>when i do the same debugging on an Android device i get the same "data" byte array but the "str" string is 4 identical bytes which reads out as 4 question mark.</p>
  
  <p>my question is: how can java take 1 byte and "know" it's hebrew, and how can i do it in Android just the same?</p>
  
  <p>thanks</p>
  
  <p>code:</p>
  
  <pre><code>iDefLength=4;
  RandomAccessFile R = new RandomAccessFile(file, "r");       
  R.read(bDefinition, 0, iDefLength);
  this.sDef = new String(bDefinition);
  </code></pre>