Reputation: 41
The thing is that when I try to use Russian letters in Identity pre-made pages they just doesn't work. They look like this. I'm using Razor Pages btw.
This is _LoginPartial.cshtml for example
@using Microsoft.AspNetCore.Identity
@using AIProbe0.Data
@inject SignInManager<ApplicationUser> SignInManager
@inject UserManager<ApplicationUser> UserManager
@if (SignInManager.IsSignedIn(User))
{
<form asp-controller="Account" asp-action="Logout" method="post" id="logoutForm" class="navbar-right">
<ul class="nav navbar-nav navbar-right">
<li>
<a asp-page="/Account/Manage/Index" title="Manage">@UserManager.GetUserName(User)</a>
</li>
<li>
<button type="submit" class="btn btn-link navbar-btn navbar-link">Log out Выйти</button>
</li>
</ul>
</form>
}
else
{
<ul class="nav navbar-nav navbar-right">
<li><a asp-page="/Account/Register">Registration</a></li>
<li><a asp-page="/Account/Login">Log in</a></li>
</ul>
}
I tried to use <meta charset="utf-8" />
and <meta charset="Windows-1251" />,
but it didn't help at all. My own pages are allright.
Tried to find the reason, but failed. How can I make Identity pages see Russian letters?
Upvotes: 1
Views: 839
Reputation: 41
Allright, I don't know is it a bug or something, but Visual Studio creates some ASP.NET Core pages witch ANSI-encoding and not with UTF-8. The only solution I found is to manually change file's encoding with NotePad++. At least it's not hard, only takes time. Works fine, though.
Upvotes: 1