更新时间:2023-11-07 19:27:04
我用这个:
public static string RemoveAccents(this string accentedStr)
{
byte[] tempBytes = Encoding.GetEncoding("ISO-8859-8").GetBytes(accentedStr);
return Encoding.UTF8.GetString(tempBytes, 0, tempBytes.Length);
}
编辑:此解决方案在Windows 8应用程序中有效,但在Windows Phone中不可用。到目前为止,我发现的***解决方案是本手册:
http://invokeit.wordpress.com/2011/10/06/how-to-remove-diatrics-accent-marks-in- Windows Phone 7-x /
this solution works in Windows 8 apps, but not in Windows Phone. The best solution I have found so far is this manual one:
http://invokeit.wordpress.com/2011/10/06/how-to-remove-diatrics-accent-marks-in-windows-phone-7-x/