0

Possible Duplicates:
How to convert a Unicode character to its ASCII equivalent
Converting ê to e and etc in .net c#

I need to convert a character from an accented European Unicode character (e.g. 'â') to the closest English equivalent (e.g. 'a') in C#

Ideas?

Community
  • 1
  • 1
BrendanS
  • 99
  • 12
  • 1
    1. Get a list of all accented Latin characters and their closest non-accented equivalent. 2. Replace any such character in the input string with the equivalent. 3. Done. What part do you need help with? What have you tried so far? – dtb Jul 08 '11 at 18:49
  • See this similar SO post http://stackoverflow.com/questions/138449/how-to-convert-a-unicode-character-to-its-ascii-equivalent#141816 – Rahul Jul 08 '11 at 19:00
  • 1
    @Darin Dimitrov: I don't think it is a duplicate of the question you reference as that question doesn't remove the 'accent', it takes a Unicode character and turns it into its ASCII equivalent, with the 'accent' intact. – Matt Ellen Jul 08 '11 at 19:03
  • 1
    Another dupe: http://stackoverflow.com/q/6342283/60761 – Henk Holterman Jul 08 '11 at 19:12
  • 2
    sigh @ SO. You spent so much time looking for dupe and posting links to blogs (some which were broken), no-one thought to post the 1 line solution here: string.Normalize(NormalizationForm.FormD) – BrendanS Jul 08 '11 at 19:23
  • 1
    Turning 'â' into 'a' **is not normalization** -- it's *transliteration*. Normalization ins a standardized algorithm to select a canonical representative from among several different, *equivalent* strings of codepoints. – Kerrek SB Jul 08 '11 at 22:21

0 Answers0