[3.12] gh-124188: Fix PyErr_ProgramTextObject() (GH-124189) (GH-124426)
* 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 e2f710792b0418b8ca1ca3b8cdf39588c7268495)
S
Serhiy Storchaka committed
18542240c26cea2b5e0372b668a5e67bd9015379
Parent: 7e2d414
Committed by GitHub <noreply@github.com>
on 9/24/2024, 8:53:54 AM