.. _invalid-character-sub:

invalid-character-sub / E2512
=============================

**Message emitted:**

Invalid unescaped character sub, use "\x1A" instead.

**Description:**

*Ctrl+Z "End of text" on Windows. Some programs (such as type) ignore the rest of the file after it.*


**Correct code:**

.. literalinclude:: /data/messages/i/invalid-character-sub/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.