title: Javascript Blob object saved as file contains extra bytes
body: <p>I have a program which reads an array of bytes. Those bytes are supposed to be ISO-8859-2 decimal codes of characters.  My test array has two elements: 103 which is letter <code>g</code> and 179 which is letter <code>ł</code> (l with tail). I then create a Blob object from it and check its content using two methods:</p>
  
  <ol>
  <li>FileReader</li>
  <li>objectURL</li>
  </ol>
  
  <p>The first method gives correct results but the second method gives an extra character in the saved blob file.</p>
  
  <p>Here is the code:</p>
  
  <pre><code>var bytes = [103, 179];
  var chr1 = String.fromCharCode(bytes[0]);
  var chr2 = String.fromCharCode(bytes[1]);
  var str = '';
  str += chr1;
  str += chr2;
  console.log(str.charCodeAt(0)); //103
  console.log(str.charCodeAt(1)); //179
  console.log(str.charCodeAt(2)); //NaN
  
  var blob = new Blob([str]);
  console.log(blob.size); //3
  
  //Checking Blob contents using first method - FileReader
  var reader = new FileReader();
  reader.addEventListener("loadend", function() {
      var str1 = this.result;
      console.log(str1); //g³
      console.log(str1.charCodeAt(0)); //103
      console.log(str1.charCodeAt(1)); //179
      console.log(str1.charCodeAt(2)); //NaN
  });
  reader.readAsText(blob);
  
  //Checking Blob contents using second method - objectURL
  var url = URL.createObjectURL(blob);
  $('&lt;a&gt;',{
      text: 'Download the blob',
      title: 'Download',
      href: url
  
  }).appendTo('#my');
  </code></pre>
  
  <p>In order to use the second method I created a <a href="http://jsfiddle.net/k4Qwn/" rel="nofollow">fiddle</a>. In the fiddle, when you click the "Download" link and save and then open the file in a binary editor, it consists of the following bytes: 103, 194, 179. </p>
  
  <p>My question is, where does the 194 come from and how to create a blob file (using the <code>createobjectURL</code> method) containing only bytes given in the original array ([103, 179] in this case).</p>