X Tutup
Skip to content

[3.12] gh-124188: Fix PyErr_ProgramTextObject() (GH-124189)#124426

Merged
serhiy-storchaka merged 1 commit intopython:3.12from
serhiy-storchaka:backport-e2f7107-3.12
Sep 24, 2024
Merged

[3.12] gh-124188: Fix PyErr_ProgramTextObject() (GH-124189)#124426
serhiy-storchaka merged 1 commit intopython:3.12from
serhiy-storchaka:backport-e2f7107-3.12

Conversation

@serhiy-storchaka
Copy link
Member

@serhiy-storchaka serhiy-storchaka commented Sep 24, 2024

  • Detect source file encoding.
  • Use the "replace" error handler even for UTF-8 (default) encoding.
  • Remove the BOM.
  • Fix detection of too long lines if they contain NUL.
  • Return the head rather than the tail for truncated long lines. (cherry picked from commit e2f7107)

* Detect source file encoding.
* Use the "replace" error handler even for UTF-8 (default) encoding.
* Remove the BOM.
* Fix detection of too long lines if they contain NUL.
* Return the head rather than the tail for truncated long lines.
(cherry picked from commit e2f7107)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

X Tutup