gh-107607: Update comment about utf-8 BOM being ignored (#107858)

---------
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
This commit is contained in:
Sunghyun Kim 2024-03-19 11:51:12 -04:00 committed by GitHub
parent 2c82592ab4
commit 7f64ae30dd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 4 deletions

View File

@ -96,10 +96,9 @@ which is recognized also by GNU Emacs, and ::
which is recognized by Bram Moolenaar's VIM.
If no encoding declaration is found, the default encoding is UTF-8. In
addition, if the first bytes of the file are the UTF-8 byte-order mark
(``b'\xef\xbb\xbf'``), the declared file encoding is UTF-8 (this is supported,
among others, by Microsoft's :program:`notepad`).
If no encoding declaration is found, the default encoding is UTF-8. If the
implicit or explicit encoding of a file is UTF-8, an initial UTF-8 byte-order
mark (b'\xef\xbb\xbf') is ignored rather than being a syntax error.
If an encoding is declared, the encoding name must be recognized by Python
(see :ref:`standard-encodings`). The