How to remove accentuated characters from a string with C

public string RemoveAccentuatedCharacters(string input)
{
    byte[] aOctets = System.Text.Encoding.GetEncoding(1251).GetBytes(input);
    return System.Text.Encoding.ASCII.GetString(aOctets);
}

Published 31st Aug 2011 // #dotnet #tips




comments powered by Disqus