Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Simpliy decode call
Co-authored-by: Inada Naoki <songofacandy@gmail.com>
  • Loading branch information
ncoghlan and methane authored May 24, 2024
commit 1828c45d03486eca8b962ad5e630bbf251b8238c
2 changes: 1 addition & 1 deletion Lib/site.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ def addpackage(sitedir, name, known_paths):
try:
# Accept BOM markers in .pth files as we do in source files
# (Windows PowerShell 5.1 makes it hard to emit UTF-8 files without a BOM)
pth_content = pth_content.decode(encoding="utf-8-sig")
pth_content = pth_content.decode("utf-8-sig")
except UnicodeDecodeError:
# Fallback to locale encoding for backward compatibility.
# We will deprecate this fallback in the future.
Expand Down