[Python] How to convert a file to utf-8 in Python?

Discussão em 'Python' iniciado por Stack, Fevereiro 10, 2025.

  1. Stack

    Stack Membro Participativo

    I need to convert a bunch of files to utf-8 in Python, and I have trouble with the "converting the file" part.

    I'd like to do the equivalent of:

    iconv -t utf-8 $file > converted/$file # this is shell code


    Thanks!

    Continue reading...

Compartilhe esta Página