SIGN IN SIGN UP

[3.14] gh-63161: Fix PEP 263 support (GH-139481) (GH-139898)

* Support non-UTF-8 shebang and comments if non-UTF-8 encoding is specified.
* Detect decoding error in comments for UTF-8 encoding.
* Include the decoding error position for default encoding in SyntaxError.
(cherry picked from commit 5c942f11cdf5f9d7313200983fa0c58b3bc670a2)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
M
Miss Islington (bot) committed
9ff705c6c59a7561b065639ebb07f3341083e869
Parent: 69d263c
Committed by GitHub <noreply@github.com> on 10/19/2025, 7:16:33 PM