[3.12] gh-107607: Update comment about utf-8 BOM being ignored (GH-107858) (#117016)

(cherry picked from commit 7f64ae30dd)
Co-authored-by: Terry Jan Reedy tjreedy@udel.edu
This commit is contained in:
Miss Islington (bot) 2024-03-19 17:00:40 +01:00 committed by GitHub
parent 35e8f04f1b
commit 1627c1ee01
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

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