• [^] # Re: ASCII devient l'encodage par défaut

    Posté par . En réponse au journal Python 2.5 beta 2. Évalué à 3.

    Avant c'était de l'iso-8859 par défaut, et donc ça mettait un bordel monstre.

    Par contre la première ligne # -*- coding: utf-8 -*- existe encore.

    Je cite http://docs.python.org/dev/whatisnew/ :

    ASCII is now the default encoding for modules. It's now a syntax error if a module contains string literals with 8-bit characters but doesn't have an encoding declaration. In Python 2.4 this triggered a warning, not a syntax error. See PEP 263 ( http://www.python.org/peps/pep-0263.html ) for how to declare a module's encoding; for example, you might add a line like this near the top of the source file:
    # -*- coding: latin1 -*-