title: Change Response Header Encode .Net Core
body: <p>I need help changing the encoding of the response header on .Net Core 1.1.</p>
  
  <p>We're developing an application and we created a custom header called "X-Application-Error" where any error that happens at the backend of the aplication  returns a response code 500 and inside the header the message. This way I use the "app.UseExceptionHandler" to catch the errors, put it inside the header, and the front end, if it recieves and response code 500, displays the message sent at the header.</p>
  
  <p>This is working as expected, the trouble that I'm having is that I need to send chacters like "é", "ã" and others, and the default encoding of the header is UTF-8, so it doesn't display those characters.</p>
  
  <p>At the .net framework, we can use the "HttpResponse.HeaderEncoding" Property to change it (<a href="https://msdn.microsoft.com/en-us/library/system.web.httpresponse.headerencoding(v=vs.110).aspx" rel="nofollow noreferrer">https://msdn.microsoft.com/en-us/library/system.web.httpresponse.headerencoding(v=vs.110).aspx</a>)
  but I can't find the equivalent for the .Net Core (1.1)</p>
  
  <p>I found a similar question here (<a href="https://stackoverflow.com/questions/14751072/c-sharp-webclient-non-english-request-header-value-encoding">C# WebClient non-english request header value encoding</a>) but no answer too.</p>