Skip to content

fix: emoji encoding on win32#273

Merged
nimish-ks merged 2 commits intomainfrom
fix--emojies-encoding-on-win32
Feb 2, 2026
Merged

fix: emoji encoding on win32#273
nimish-ks merged 2 commits intomainfrom
fix--emojies-encoding-on-win32

Conversation

@nimish-ks
Copy link
Member

Fix Unicode encoding errors on Windows

Wraps stdout/stderr with UTF-8 encoding on Windows to prevent UnicodeEncodeError when printing emojis in CLI output. Uses io.TextIOWrapper with errors='replace' to handle both direct terminal and piped output scenarios. This provides a seamless out-of-the-box experience rather than requiring users to set PYTHONUTF8=1 manually.

- Added logic to ensure stdout and stderr are set to utf-8 encoding on Windows to prevent UnicodeEncodeError when printing emojis in help text or status messages.
- This change improves compatibility and user experience when using the CLI on Windows systems.
- Updated the package version from 1.21.2 to 1.21.3 in both APKBUILD and const.py files to reflect the latest release.
@nimish-ks nimish-ks self-assigned this Jan 31, 2026
@nimish-ks nimish-ks added the bug Something isn't working label Jan 31, 2026
@cloudflare-workers-and-pages
Copy link

Deploying phase-cli-install-script with  Cloudflare Pages  Cloudflare Pages

Latest commit: c63b3a2
Status: ✅  Deploy successful!
Preview URL: https://4ebd8a22.phase-cli-install-script.pages.dev
Branch Preview URL: https://fix--emojies-encoding-on-win.phase-cli-install-script.pages.dev

View logs

@MrErikCodes
Copy link

Thanks for this quick fix :)

@nimish-ks nimish-ks changed the title fix: emojies encoding on win32 fix: emoji encoding on win32 Feb 1, 2026
@nimish-ks nimish-ks merged commit cfa6351 into main Feb 2, 2026
46 checks passed
@nimish-ks nimish-ks deleted the fix--emojies-encoding-on-win32 branch February 2, 2026 06:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants