回答

4

我用這個:

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/

+2

我已經看到它在CodeProject上,但在WP7我收到** ISO-8859-8' 是不支持的編碼名稱** – onmyway133

+0

我必須接受來自鏈接的手動解決方案。 = [ 但它工作得很好。 –

相關問題