characters ô ö à é è

Hi!

I have a file with some characters with accent.

I don't find the solution to translate
� � as o
� as a
� � as e
� as c

With the command tr or sed?
I can't write sed 's/�/o/g' because the copy/paste � don't work.

Thanks!

Well ... Unicode is designed to make this easy in certain environments.

For example, the following works on my system (bash):

cbkihong@cbkihong:~$ LC_ALL=en_US.UTF-8 \ 
iconv -f 'iso-8859-15' -t 'utf-8' /tmp/testfile_ISO8859_15.txt \
| sed -e s/[$'\303\264'$'\303\266']/o/g -e s/$'\303\240'/a/g

I don't find the solution to translate 
 o o as o
 a as a
 � � as e
 � as c
 
 With the command tr or sed? 
 I can't write sed 's/o/o/g' because the copy/paste o don't work.

(The \ are line continuation)

I copied the content of your post in the file testfile_ISO8858_15.txt with the ISO-8859-15 character set, which supports all the accented characters you listed. The command converts the file into Unicode on the fly (if you have the source files in UTF-8, you can save this step!), then make use of the bash $'\nnn' syntax to refer to the character by code without literally typing them out.

Here I have the first two done for you as an example. If you decide on expanding it you should be able to complete the rest. Of course you can redirect the output to a file, and/or convert the encoding as you prefer.