If I put this Startup in an ASP.NET Core application the text will be scrambled (ÅÄÖ). Same thing happens if I do it in a middleware. Passing Encoding.UTF8
to WriteAsync
doesn't help.
public class Startup
{
public void Configure(IApplicationBuilder app)
{
app.Run(async context => { await context.Response.WriteAsync("ÅÄÖ"); });
}
}
What's wrong and what can I do to fix it?