Is there any alternative to string.Normalize() in WinRT? I want to simply remove accents from input strings using this approach, but I cannot find anywhere this method in WinRT.
I've discovered here quick and short solution, that works just fine in 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);
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With