Text Processing – Remove Accents from Characters

text processing

I'm quite certain this has been asked and answered before, however, I cannot find the answer to my specific use-case.

I've got this file with accented characters in it:

>  ~ cat file
ë
ê
Ý,text
Ò
É

How would I convert them to their respective non-accented letters? So the outcome would be something along the lines of:

> ~ convert file out.txt
> ~ cat out.txt
e
e
Y,text
O
E

Note that the actual file itself contains more characters.

Best Answer

You can try iconv, with the //TRANSLIT (transliteration) option

Ex. given

$ cat file
ë
ê
Ý,text
Ò
É

then

$ iconv -t ASCII//TRANSLIT file
e
e
Y,text
O
E