.. _bad-file-encoding:

bad-file-encoding / C2503
=========================

**Message emitted:**

PEP8 recommends UTF-8 as encoding for Python files

**Description:**

*PEP8 recommends UTF-8 default encoding for Python files. See https://peps.python.org/pep-0008/#source-file-encoding*


**Correct code:**

.. literalinclude:: /data/messages/b/bad-file-encoding/good.py
   :language: python

**Additional details:**

You can help us make the doc better `by contributing <https://github.com/PyCQA/pylint/issues/5953>`_ !


Created by the `unicode_checker <https://github.com/PyCQA/pylint/blob/main/pylint/checkers/unicode.py>`__ checker.