9

I need to remove accents from strings, is there a Delphi (2009+) function for this?

I want that my string contains only A-Z a-z 0-9 chars, so I want to remove accents automatically

Like:

RemoveAccents(àèÃÜÿñ)

that gives

aeAUyn

etc....

H H
  • 263,252
  • 30
  • 330
  • 514
UnDiUdin
  • 14,924
  • 39
  • 151
  • 249
  • What Delphi version are you using? – Mason Wheeler Jun 21 '10 at 13:13
  • I updated the question Delphi 2009, unicode. – UnDiUdin Jun 21 '10 at 13:17
  • 2
    Yes it is a duplicate, anyway I think it makes sense to leave this because the question is easy to find. I searched before posting but in my search conditions I searched for "removing accents" not for "convert chars to ascii equivalents"... – UnDiUdin Jun 21 '10 at 15:58
  • @Jeroen. I would agree to leave it for search purposes, even if it seems like a duplicate. (and it directly points to the same answer anyway) – Francesca Jun 21 '10 at 18:23
  • @François: Maybe we can merge this question e two questions into the first one. Then people searching can get the bigger picture? – Jeroen Wiert Pluimers Jun 22 '10 at 06:42
  • Yes sure, I don't have rights for doing this. it would be the best "refactoring". Just add "removing accents from a string" in the original question. – UnDiUdin Jun 22 '10 at 07:34
  • [Convert Hi-Ansi chars to Ascii equivalent (é -> e)](https://stackoverflow.com/questions/1891196/convert-hi-ansi-chars-to-ascii-equivalent-e-e-in-delphi2007/1892432#1892432) – Zoë Peterson Jun 21 '10 at 13:27

0 Answers0