在WinRT中有没有string.Normalize()的替代方法?我想使用这种方法简单地从输入字符串中删除重音符号,但我在WinRT中找不到这个方法。
我在这里发现了一个快速简短的解决方案,可以在WinRT中完美运行:点击此处
public static string RemoveAccents(this string accentedStr)
{
byte[] tempBytes = Encoding.GetEncoding("ISO-8859-8").GetBytes(accentedStr);
return Encoding.UTF8.GetString(tempBytes, 0, tempBytes.Length);
}