title: HttpPostedFileBase to byte[] how to keep the encoding?
body: <p>So, the scenario is this:
  A user uploads a file, my code turns this file into an array of bytes, and than the array is passed to an external API. And this works fine.</p>
  
  <p>The problem is that this file contains special characters like æ,ø,å, and when the byte[] is converted into characters again, these characters are replaced by "?".</p>
  
  <pre><code>public void UploadFile(HttpPostedFileBase file){
      var binary = new byte[file.ContentLength];
      file.InputStream.Read(binary, 0, file.ContentLength;
      var result = API.UploadDocument(binary); //Passes the file to the external API
  }
  </code></pre>
  
  <p>Can I add some encoding-info to the byte-array or the InputStream, or is it the API's responsibillity to make sure that the text is properly encoded when converting the byte[] back to characters?</p>