Skip to content

bug(test-eest): reconfigure output streams to UTF-8 on Windows consoles - #3209

Merged
marioevz merged 1 commit into
ethereum:forks/amsterdamfrom
Kumarutkarsh9470:fix/eest-utf8-windows-console
Jul 27, 2026
Merged

marioevz merged 1 commit into
ethereum:forks/amsterdamfrom
Kumarutkarsh9470:fix/eest-utf8-windows-console

Conversation

@Kumarutkarsh9470

@Kumarutkarsh9470 Kumarutkarsh9470 commented Jul 22, 2026 •

Copy link
Copy Markdown
Contributor

The eest commands print Unicode characters (box drawing in info, emoji in clean and make) via click.echo. On a Windows console using a legacy code page such as cp1252, these characters cannot be encoded and the command aborts with UnicodeEncodeError.

Reconfigure sys.stdout/sys.stderr to UTF-8 in the eest group callback, guarded so streams that do not support reconfiguration (for example captured output under tests) are left untouched. Add regression tests covering a legacy-encoded stdout.

Description

Related Issues or PRs

N/A.

Checklist

  • Ran fast static checks to avoid CI fails, see Code Standards & Verifying Changes: just static
  • PR title has the form <type>(<area>): <title>, where <type> and <area> come from an appropriate C-<type>, respectively A-<area>, label. The title should match the target squash commit message.

Cute Animal Picture

cat

The `eest` commands print Unicode characters (box drawing in `info`,
emoji in `clean` and `make`) via `click.echo`. On a Windows console
using a legacy code page such as `cp1252`, these characters cannot be
encoded and the command aborts with `UnicodeEncodeError`.

Reconfigure `sys.stdout`/`sys.stderr` to UTF-8 in the `eest` group
callback, guarded so streams that do not support reconfiguration (for
example captured output under tests) are left untouched. Add regression
tests covering a legacy-encoded stdout.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

@marioevz marioevz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Thanks for this fix.

cc @danceratopz I think it would be nice for us to enable a weekly windows run so we can keep the support for the platform, not urgent but wdyt?

@codecov

codecov Bot commented Jul 27, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (forks/amsterdam@2282c75). Learn more about missing BASE report.
⚠️ Report is 14 commits behind head on forks/amsterdam.

Additional details and impacted files
@@                Coverage Diff                 @@
##             forks/amsterdam    #3209   +/-   ##
==================================================
  Coverage                   ?   93.39%           
==================================================
  Files                      ?      624           
  Lines                      ?    37014           
  Branches                   ?     3386           
==================================================
  Hits                       ?    34570           
  Misses                     ?     1671           
  Partials                   ?      773           
Flag Coverage Δ
unittests 93.39% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@marioevz
marioevz merged commit 3d3afa6 into ethereum:forks/amsterdam Jul 27, 2026
26 checks passed
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