File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -96,10 +96,9 @@ which is recognized also by GNU Emacs, and ::
96
96
97
97
which is recognized by Bram Moolenaar's VIM.
98
98
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'\x ef\x bb\x bf') is ignored rather than being a syntax error.
103
102
104
103
If an encoding is declared, the encoding name must be recognized by Python
105
104
(see :ref: `standard-encodings `). The
You can’t perform that action at this time.
0 commit comments