title: Handler response wrong filename encoding
body: <p>My handler:</p>
  
  <pre><code>public void ProcessRequest(HttpContext context) {
      HttpRequest request = context.Request;
      HttpResponse response = context.Response;
  
      try {
          response.Clear();
          response.AddHeader("pragma", "no-cache");
          response.AddHeader("cache-control", "private");
          response.CacheControl = "no-cache";
  
          SqlConnection conn = new SqlConnection(connString);
          conn.Open();
  
          SqlCommand cmd = new SqlCommand("dbo.cpGetBinary", conn);
          cmd.Parameters.AddWithValue("id", request.Params["id"]);
          cmd.CommandType = CommandType.StoredProcedure;
  
          SqlDataReader dReader = cmd.ExecuteReader();
          dReader.Read();
  
          context.Response.ContentType = "text/rtf; charset=UTF-8";
          context.Response.Charset = Encoding.UTF8.EncodingName;
          response.AddHeader("Content-Disposition", string.Format("attachment; filename={0}", dReader["content_file"]));
          response.ContentType = "application/octet-stream";
          response.BinaryWrite((byte[])dReader["binary_value"]);
          dReader.Close();
          conn.Close();
          response.End();
      }
      catch (Exception ex) {
  
      }
  }
  </code></pre>
  
  <p>If my filename in Russian, the result is like 'РћР±С‰Р°СЏ РёРЅС„РѕСЂРјР°С†РёСЏ.docx' with wrong encoding.</p>
  
  <p>Database return correct value.</p>