-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
chore: popen using utf8 encoding #742
Conversation
d442ba2
to
b54fc7e
Compare
if we want to customize env not affect system env, copy it may be better |
@fatelei You’re right. I deleted my last review question after looking at things a bit more closely. Going to test this one out in a bit so we can get it merged. Thanks for the contribution! |
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.
Based on my limited testing, this seems to work as expected.
I've never encountered the error that other folks were getting, though.
what about unit tests |
@fatelei If you can think of a good way to recreate a situation that triggers the error and then add a unit test where we make sure that I haven't had a chance to put brainpower towards it because I'm not sure what the underlying environment setting that causes an issue in the first place is. I guess we could just set |
This seems like a good idea— I think in the future a good unit test would try out a bunch of different non-English chars, but something tells me that might only be useful once we can be testing things across a bunch of different OS/terminals, not just the github ubuntu non-GUI one. Great work @fatelei and thanks @ericrallen for reviewing! |
chore: popen using utf8 encoding Former-commit-id: 3f0dbdb Former-commit-id: 855b01217d5c87955a15bfdd2c66851f3c773151 Former-commit-id: a59fd5d0eea3bacaee81feb82bdf9b5252250a40 [formerly 2810a9ceca33701f274bbd8b7aaa3d4652cdfaf4] Former-commit-id: 558a4f501d5fd670a1ac58ac8bb55bb4fc579682
chore: popen using utf8 encoding
Describe the changes you have made:
Reference any relevant issue (Fixes #000)
fix #209 using utf8 encoding instead of cp1255
I have tested the code on the following OS:
AI Language Model (if applicable)