mirror of
https://github.com/python/cpython.git
synced 2025-11-24 20:30:18 +00:00
Merge branch
This commit is contained in:
commit
fed2c51eea
3 changed files with 8 additions and 1 deletions
|
|
@ -388,7 +388,7 @@ def detect_encoding(readline):
|
|||
raise SyntaxError(msg)
|
||||
|
||||
if bom_found:
|
||||
if codec.name != 'utf-8':
|
||||
if encoding != 'utf-8':
|
||||
# This behaviour mimics the Python interpreter
|
||||
if filename is None:
|
||||
msg = 'encoding problem: utf-8'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue