This commit is contained in:
Sergey M 2024-04-19 19:51:32 +01:00 committed by GitHub
commit 84b066bd2f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 0 deletions

View File

@ -65,6 +65,10 @@ namespace NzbDrone.Common.Extensions
public static string RemoveAccent(this string text)
{
var normalizedString = text.Normalize(NormalizationForm.FormD);
// use the Cyrillic letter "й" instead of the combined unicode characters
normalizedString = Regex.Replace(normalizedString, "и\u0306", "й", RegexOptions.IgnoreCase);
var stringBuilder = new StringBuilder();
foreach (var c in normalizedString)