Replace accents with normal letters

Hi,

Is there a simple way of replacing letters with accents to normal letters.
If the following are used (É, â, ê, î, ô, û, à, è, ù, ë, ï, ü) in a string… Replacement = e,a,o,u,i.

Thanks!

You would have to create an explicit mapping of the characters. You could do this by creating a dictionary (Of String, String) where the key is the special character and the value is the value you want to use. You could then iterate over the characters in the string and replace each character found in the keys of the dictionary.

1 Like

@jadbenn
give a try on following


having outcome:
grafik

System.Text.Encoding.GetEncoding(“ISO-8859-8”).GetBytes(accentedStr)

  • Alternate:System.Text.Encoding.GetEncoding(1251).GetBytes(accentedStr)
    System.Text.Encoding.UTF8.GetString(tempBytes)
2 Likes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.