Skip to content

Comments

Fix Windows Unicode encoding errors when writing HTML files#7

Merged
simonw merged 3 commits intomainfrom
claude/fix-windows-unicode-encoding-dWGZN
Dec 26, 2025
Merged

Fix Windows Unicode encoding errors when writing HTML files#7
simonw merged 3 commits intomainfrom
claude/fix-windows-unicode-encoding-dWGZN

Conversation

@simonw
Copy link
Owner

@simonw simonw commented Dec 26, 2025

On Windows, the default file encoding is cp1252, which cannot encode
Unicode characters like emojis. This caused UnicodeEncodeError when
writing HTML files containing emoji characters.

Fixed by explicitly specifying encoding="utf-8" for all read_text()
and write_text() calls on HTML files.

claude and others added 3 commits December 26, 2025 04:40
On Windows, the default file encoding is cp1252, which cannot encode
Unicode characters like emojis. This caused UnicodeEncodeError when
writing HTML files containing emoji characters.

Fixed by explicitly specifying encoding="utf-8" for all read_text()
and write_text() calls on HTML files.
Add encoding="utf-8" to all read_text() and write_text() calls in tests
to ensure proper handling of UTF-8 encoded HTML files on Windows.
@simonw simonw merged commit 5b65cbc into main Dec 26, 2025
30 checks passed
@simonw simonw deleted the claude/fix-windows-unicode-encoding-dWGZN branch December 26, 2025 06:16
simonw added a commit that referenced this pull request Dec 27, 2025
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.

2 participants