title: MalformedByteSequenceException: Invalid byte 1 of 1-byte UTF-8 sequence. when using Hebrew chars
body: <p>I'm trying to parse XML file which contains Hebrew chars.
  I know that the file is correct because if I output the file (from a different software) without the hebrew chars, it parses just fine.</p>
  
  <p>I tried many things, but I always get this error</p>
  
  <pre><code>MalformedByteSequenceException: Invalid byte 1 of 1-byte UTF-8 sequence.
  </code></pre>
  
  <p>My latest attempt was to open it using <code>FileInputStream</code> and specify the encoding</p>
  
  <pre><code>DocumentBuilder db = dbf.newDocumentBuilder();
  document = db.parse(new FileInputStream(new File(xmlFileName)), "Cp1252");
  </code></pre>
  
  <p>(<code>Cp1252</code> is an encoding that worked for me in a different app)
  But I got the same result.</p>
  
  <p>Tried using <code>ByteArray</code> as well, nothing worked.</p>
  
  <p>Any suggestions?</p>