Repository navigation
Conversation
Wkhanex
reviewed
Oct 13, 2026
Wkhanex
left a comment
There was a problem hiding this comment.
I checked file and stream inputs with Café, 東京, München and an ASCII TZID, using both CRLF and LF line endings. All eight cases retained the exact ID and expected UTC offset. A spy on io.open confirmed that filename inputs explicitly pass encoding='utf-8', while caller-owned StringIO objects remained open after parsing. A ninth case surfaced UnicodeDecodeError for malformed UTF-8 instead of accepting corrupted text.
These were standalone Linux checks, so they verify the explicit-encoding path without claiming a Windows run.
I used Python 3.12.14 against commit 7e9b819. These were focused checks, not a full-suite run.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of changes
tzical(filename)currently decodes iCalendar files with the locale encoding. On a cp936 Windows installation, a UTF-8 TZID such asCafébecomesCaf茅. Open filename inputs explicitly as UTF-8, as required by the existing API documentation, usingio.open()for the supported Python 2 versions. Add a file-based regression, author entry, and news fragment.Closes #1207
Validation: the regression fails before the change and passes after it; 41 tzical tests passed with one platform skip. The complete Windows suite has the same four existing localized tzres-name failures as an unmodified-base run (1,999 vs 1,998 passing tests). Darker/isort/Black, whitespace/debug hooks, and sdist/wheel builds passed.
Pull Request Checklist