Can not remove french letters in a string returned by Python glob
<p>I would like to rename files with french letters. I am using glob to browse the files and a function I've found on the Internet to remove the french letters. The <code>supprime_accent</code> seems to work ok. However, it doesn't rename files returned by the glob function. </p>

<p>Does anybody knows what can be the reason? Is it related with glob encoding?</p>

<pre><code>def supprime_accent(ligne):
    """ supprime les accents du texte source """
    accents = { 'a': ['à', 'ã', 'á', 'â'],
                'e': ['é', 'è', 'ê', 'ë'],
                'i': ['î', 'ï'],
                'u': ['ù', 'ü', 'û'],
                'o': ['ô', 'ö'] }
    for (char, accented_chars) in accents.iteritems():
        for accented_char in accented_chars:
            ligne = ligne.replace(accented_char, char)
    return ligne

for file_name in glob.glob("attachments/*.jpg"):
    print supprime_accent(file_name)
</code></pre>
