Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 7f64ae3

Browse filesBrowse files
gh-107607: Update comment about utf-8 BOM being ignored (#107858)
--------- Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
1 parent 2c82592 commit 7f64ae3
Copy full SHA for 7f64ae3

File tree

Expand file treeCollapse file tree

1 file changed

+3
-4
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-4
lines changed

‎Doc/reference/lexical_analysis.rst

Copy file name to clipboardExpand all lines: Doc/reference/lexical_analysis.rst
+3-4Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,9 @@ which is recognized also by GNU Emacs, and ::
9696

9797
which is recognized by Bram Moolenaar's VIM.
9898

99-
If no encoding declaration is found, the default encoding is UTF-8. In
100-
addition, if the first bytes of the file are the UTF-8 byte-order mark
101-
(``b'\xef\xbb\xbf'``), the declared file encoding is UTF-8 (this is supported,
102-
among others, by Microsoft's :program:`notepad`).
99+
If no encoding declaration is found, the default encoding is UTF-8. If the
100+
implicit or explicit encoding of a file is UTF-8, an initial UTF-8 byte-order
101+
mark (b'\xef\xbb\xbf') is ignored rather than being a syntax error.
103102

104103
If an encoding is declared, the encoding name must be recognized by Python
105104
(see :ref:`standard-encodings`). The

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.