Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove # -*- coding: utf-8 -*-? #2099

Closed
DimitriPapadopoulos opened this issue Oct 7, 2021 · 3 comments · Fixed by #2364
Closed

Remove # -*- coding: utf-8 -*-? #2099

DimitriPapadopoulos opened this issue Oct 7, 2021 · 3 comments · Fixed by #2364

Comments

@DimitriPapadopoulos
Copy link
Collaborator

In Python 3, the default source file encoding is UTF-8. As far as the Python interpreter is concerned we could remove # -*- coding: utf-8 -*-.

Yet the encoding declaration might be useful to some IDEs, especially on Windows which still seems to be enforcing Windows-1252 as the default encoding on "Western" locales. On the other hand, VS tends to write into UTF-8-BOM (with an initial BOM) so we're doomed anyway!

@skangas
Copy link
Collaborator

skangas commented Nov 17, 2022

This line is used by Emacs on some platforms. I see no benefit to removing it.

@DimitriPapadopoulos
Copy link
Collaborator Author

DimitriPapadopoulos commented Nov 17, 2022

Emacs knows when it loads a Python file that Python files are UTF-8 files, doesn't it?

@skangas
Copy link
Collaborator

skangas commented Nov 21, 2022

I guess this was removed in d31e0df, so I think this issue could be closed.

@peternewman peternewman reopened this Nov 21, 2022
@peternewman peternewman linked a pull request Nov 21, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants