mirror of
https://github.com/python/cpython.git
synced 2025-07-23 11:15:24 +00:00
default source encoding is now utf-8
This commit is contained in:
parent
e8022b4b35
commit
cff882ce21
1 changed files with 2 additions and 2 deletions
|
@ -62,11 +62,11 @@ def needs_declaration(fullpath):
|
|||
infile.close()
|
||||
return False
|
||||
|
||||
# check the whole file for non-ASCII characters
|
||||
# check the whole file for non utf-8 characters
|
||||
rest = infile.read()
|
||||
infile.close()
|
||||
|
||||
if has_correct_encoding(line1+line2+rest, "ascii"):
|
||||
if has_correct_encoding(line1+line2+rest, "utf-8"):
|
||||
return False
|
||||
|
||||
return True
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue