Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit25b9728

Browse files
authored
GH-137841: Open tzdata/zones file with UTF-8 encoding (#137872)
1 parent7636a66 commit25b9728

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

‎Lib/zoneinfo/_tzpath.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,8 @@ def available_timezones():
124124
# Start with loading from the tzdata package if it exists: this has a
125125
# pre-assembled list of zones that only requires opening one file.
126126
try:
127-
withresources.files("tzdata").joinpath("zones").open("r")asf:
127+
zones_file=resources.files("tzdata").joinpath("zones")
128+
withzones_file.open("r",encoding="utf-8")asf:
128129
forzoneinf:
129130
zone=zone.strip()
130131
ifzone:

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp