Skip to content

fix: add utf-8 encoding to open() calls to prevent UnicodeEncodeError…#7789

Open
AimelHassan wants to merge 1 commit into
microsoft:mainfrom
AimelHassan:fix-windows-encoding
Open

fix: add utf-8 encoding to open() calls to prevent UnicodeEncodeError…#7789
AimelHassan wants to merge 1 commit into
microsoft:mainfrom
AimelHassan:fix-windows-encoding

Conversation

@AimelHassan
Copy link
Copy Markdown

… on Windows

Why are these changes needed?

Fixes #5566

This PR adds `encoding="utf-8"` to file `open()` calls to prevent `UnicodeEncodeError` crashes on Windows default environments (which use      

cp1252) when encountering emojis or special characters.

Checks

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.

open needs encoding='utf-8' for non-english environment, error in playwright_controller.py

1 participant