# Transformation accent characters written in Tex

I am using UTF8 encoding now and don't need to use LaTeX macros to typeset accented characters.

Would you know an automative process to convert accent characters coded with Tex macros to utf8 characters?

In other words, i would like to convert this kind of sentence :

``````M\'ethodes directes de r\'esolution de syst\`emes lin\'eaires
``````

into

``````Méthode directes de résolution de systèmes linéaires
``````

P.S: Sorry for my english, don't hesitate to correct my syntax

• Your editor can find and replace... – Paul Gaborit Jul 30 '17 at 12:26
• yes but it is a bit long if you have to do this for all kind of accents, it is not a exhaustive process – Bendesarts Jul 30 '17 at 12:28
• The source file is not related to TeX so it must be done via the editor capabilities. Search & Replace All would work properly. – percusse Jul 30 '17 at 12:29
• And if you have a lot of files where you want to do replacements, a little script (python for example) would do a good job. – elementzero23 Jul 30 '17 at 12:30
• This doesn't really have anything to do with (La)TeX. You'll be able to use any editor for a search-and-replace, or compile your document and then copy-and-paste the UTF8 output back to your source. – Werner Jul 30 '17 at 12:43

Just use `recode` which is perfect for that kind of job like so:
``````recode -d TeX..u8 file.tex
• @Bendesarts keep in mind that `recode` will overwrite your files. Make a backup first. – Robert Alessi Jul 30 '17 at 14:40
• @PaulGaborit Yes, `recode` good though it may be at its job, must be used with great caution! – Robert Alessi Jul 30 '17 at 18:15