[
  {
    "Id": "984467",
    "ThreadId": "429012",
    "Html": "\r\n<p>I create a fileresult in a controller using dotnetzip from a [] array like this</p>\r\n<div style=\"color:black; background-color:white\">\r\n<pre><div style=\"color:black; background-color:white\"><pre><span style=\"color:blue\">byte</span>[] fileBytes =array\nMemoryStream outputStream = <span style=\"color:blue\">new</span> MemoryStream();                       \n<span style=\"color:blue\">using</span> (ZipFile zipFile = <span style=\"color:blue\">new</span> ZipFile())\n{\nzipFile.AddEntry(returnFileName, fileBytes);\nzipFile.Save(outputStream);\n}\noutputStream.Position = 0;\n                        \n<span style=\"color:blue\">return</span> File(outputStream, <span style=\"color:#a31515\">&quot;application/zip&quot;</span>, returnFileName &#43; <span style=\"color:#a31515\">&quot;.zip&quot;</span>);&nbsp;</pre>\n</div>\n</pre>\r\n</div>\r\n<p>When i unzip the file and open it instead of the original file, the content are extrange caracters like this ones:</p>\r\n<p>&frac14;&bull;MO&Acirc;@&dagger;&iuml;&amp;&thorn;&Dagger;f&macr;&dagger;.b&OElig;&iexcl;x&eth;&atilde;&uml;$b&acirc;u&iacute;t&Atilde;~eg@&oslash;&divide;n&middot;XA!^&ordm;i;&oacute;&frac34;&Iuml;&Icirc;t&sect;&fnof;&euml;&yen;&Ntilde;&Ugrave;*g&Ouml;&Euml;&raquo;,[:&copy;&igrave;&acute;&Iuml;&atilde;&ucirc;&Icirc;%&Euml;&bdquo;&bull;B;[&sup2;&zwnj;​&euml;&aacute;&eacute;&Eacute;</p>\r\n<p>The filebytes is correct because i have an option to download the file without zipping so i return in that case something like this,And the file is open correctly. :</p>\r\n<pre><span style=\"color:blue\">return</span> File(fileBytes, <span style=\"color:#a31515\">&quot;text/html&quot;</span>, returnFileName);</pre>\r\n<p>Another thing if i overwrite the filebytes with this:</p>\r\n<pre><div style=\"color:black; background-color:white\"><pre>fileBytes = Encoding.ASCII.GetBytes(<span style=\"color:#a31515\">&quot;abcdefghi&quot;</span>);</pre>\n</div>\n</pre>\r\n<p>The file after unzipping is load correctly</p>\r\n",
    "PostedDate": "2013-01-09T06:06:52.573-08:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  }
]