.. _non-ascii-file-name: non-ascii-file-name / W2402 =========================== **Message emitted:** ``%s name "%s" contains a non-ASCII character.`` **Description:** *Under python 3.5, PEP 3131 allows non-ascii identifiers, but not non-ascii file names.Since Python 3.5, even though Python supports UTF-8 files, some editors or tools don't.* **Problematic code:** ``bàd.py``: .. literalinclude:: /data/messages/n/non-ascii-file-name/bad/bàd.py :language: python ``not_bétter.py``: .. literalinclude:: /data/messages/n/non-ascii-file-name/bad/not_bétter.py :language: python **Correct code:** ``__init__.py``: .. literalinclude:: /data/messages/n/non-ascii-file-name/good/__init__.py :language: python ``bad.py``: .. literalinclude:: /data/messages/n/non-ascii-file-name/good/bad.py :language: python ``not_better.py``: .. literalinclude:: /data/messages/n/non-ascii-file-name/good/not_better.py :language: python **Related links:** - `PEP 489 `_ - `PEP 672 `_ - `Python issue 20485 `_ Created by the `nonascii-checker `__ checker.