N
N
NewDevLab2020-03-11 13:04:37
ASP.NET
NewDevLab, 2020-03-11 13:04:37

Response encoding in ASP.NET Core 3.1?

Until now, in ConfigureServices you need to write

services.AddSingleton(HtmlEncoder.Create(allowedRanges: new[] { UnicodeRanges.BasicLatin, UnicodeRanges.Cyrillic }));


to prevent conversion of Cyrillic to HTML unicode strings?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Korotenko, 2020-03-11
@NewDevLab

What encoding do you send?
In theory, in utf-8 everything goes as it should

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question