-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
fix: handle wide-character output on Windows console to avoid truncation #3767
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #3767 +/- ##
=======================================
Coverage 11.59% 11.59%
=======================================
Files 92 92
Lines 17358 17358
Branches 8106 8106
=======================================
Hits 2013 2013
Misses 12853 12853
Partials 2492 2492
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
|
What if we change the code to look some thing like this?
where the I have not checked if it compiles, but please do try it out. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please try the suggestions from Frog.
Description
This change fixes a bug where the console would stop printing any subsequent output if it encountered Chinese characters. By converting the wide-string output to UTF-8 with
converter.to_bytes()
, the console now continues to properly display messages containing Chinese characters without interruption.Screenshot
Issues Fixed or Closed
No specific issue references.
Type of Change
.github/...
)Checklist