Skip to content

Preserve Unicode output with the Windows more pager - #1865

Open
euno102 wants to merge 1 commit into
python-cmd2:mainfrom
euno102:codex/windows-more-unicode
Open

euno102 wants to merge 1 commit into
python-cmd2:mainfrom
euno102:codex/windows-more-unicode

Conversation

@euno102

@euno102 euno102 commented Dec 4, 2026

Copy link
Copy Markdown

Summary

Refs #1845. Windows more.com can exit with status 0 after dropping a line of UTF-8 text. I reproduced this by piping a long CJK line into more.com with console code page 65001. The trailing marker was missing, while the same probe with ASCII retained it.

When ppaged() would use Windows more or more.com for non-ASCII output, it now writes the rendered text directly. This trades pagination for preserving the text in that case. ASCII output and configured alternative pagers still use the existing pager path. The scope is the external pager path, separate from the toolbar pager in #1814.

Validation

  • Windows: both regression cases failed before the fix and passed afterward. Full suite: 2,960 passed, 265 skipped.
  • Linux: make check, make test (3,218 passed, 7 skipped), and make docs-test passed.

AI disclosure: OpenAI Codex helped reproduce the issue, write the patch and regression tests, run validation, and draft this description.

@codecov

codecov Bot commented Dec 4, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.76%. Comparing base (9963c78) to head (70f6e9a).
⚠️ Report is 10 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1865   +/-   ##
=======================================
  Coverage   99.76%   99.76%           
=======================================
  Files          23       23           
  Lines        6773     6780    +7     
=======================================
+ Hits         6757     6764    +7     
  Misses         16       16           
Flag Coverage Δ
unittests 99.76% <100.00%> (+<0.01%) ⬆️

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.

This branch has not been deployed

No deployments
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.

1 participant