Skip to content
Advertisement

Python fix french accents parsed as =C3=A9

In python i’m stuck with a couple of strings from french language with accents that I can’t convert back to normal, e.g.:

JavaScript

Most documentation I read specify to read the files with some encodings=’utf-8′ or so, but here I’m stuck with actual strings. Is there a way to decode the strings or should I build a maximega .replace() function ?

Advertisement

Answer

The encoding seems to be Quoted Printable.

JavaScript

Actually the function expects bytes as input, so it would be even better to have the words declared as bytes:

JavaScript
User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement