-
Notifications
You must be signed in to change notification settings - Fork 396
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Configure UTF-8 output encoding globally
Force UTF-8 encoding for stdout/stderr streams to handle locale-related issues across platforms. This replaces the manual encoding workaround and ensures consistent behavior regardless of the system's locale settings. - Fixes crashes when printing Unicode characters on systems with non-UTF-8 locales (e.g. Chinese GB18030 or Windows CP1252) - Centralizes encoding configuration in init.py - Removes redundant per-file encoding logic This approach works cross-platform by directly wrapping the standard streams rather than relying on environment variables, which can be unreliable on Windows.
- Loading branch information
Showing
2 changed files
with
20 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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