title: Why am I getting this error in IE: "The data area passed to a system call is too small"?
body: <p>I'm creating a csv file for download using Javascript and it's working perfectly fine in everything except for IE (I've tested 8 and 10).  </p>
  
  <p>In IE8, when I click the button to create and download the file I get an error that comes up and says <code>"The data area passed to a system call is too small"</code>.  In IE10, when I click the button it just opens a new tab that has the URL I've created in the address bar but doesn't download anything.</p>
  
  <p>Any ideas what this error means?</p>
  
  <p>I have this code in a button:</p>
  
  <pre><code>var csvContent = "data:text/csv;charset=utf-8,";
  csvContent += escape(myCSVvariable);
  
  var encodedUri = encodeURI(csvContent);
  window.open(encodedUri);
  </code></pre>
  
  <p>This is related to this question but I started a new one because I got a different error after changing some things - <a href="https://stackoverflow.com/questions/20843219/how-do-i-create-and-download-a-csv-file-using-javascript">How do I create and download a csv file using Javascript?</a></p>