-
Notifications
You must be signed in to change notification settings - Fork 13
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
Check terminal encoding #101
Check terminal encoding #101
Conversation
a516686
to
c2688e7
Compare
c2eeae2
to
b77986f
Compare
291efc3
to
1dfa326
Compare
So the question is - are we doing more harm than good. How much do we care about the zoo of code pages on Windows? Windows Terminal can now do utf-8. That's always an option, just additional steps that will likely not be intuitive to the user. We could also decide to not exit on Windows at all. And instead if it's not utf-8 and it's Windows, output a message that says "please stick to ASCII characters". WDYT? |
1dfa326
to
16ef0ff
Compare
Test Coverage: Download HTML Report
|
831e5b0
to
5ac6fa9
Compare
Test Coverage: Download HTML Report
|
5ac6fa9
to
c4e8d8c
Compare
Test Coverage: Download HTML Report
|
0f4e831
to
bb102bf
Compare
bb102bf
to
b9f4440
Compare
Test Coverage: Download HTML Report
|
Test Coverage: Download HTML Report
|
Test Coverage: Download HTML Report
|
Test Coverage: Download HTML Report
|
Resolves #34
Changes
Checks for utf-8 terminal encoding on password strength check. If not
utf-8
and the password isn't ASCII, ask the user to retype.If the platform is not Windows, suggest to switch to a
utf-8
terminal instead.utf-8 terminal is not a standard on Windows, it uses "a zoo of code pages"
utf-8 console on Windows in Python is alas also not a thing. PEP528 has been around since 2016, don't hold your breath.
Types of changes
What types of changes does your code introduce?
Testing
Notes on testing
The reason this failed in the Windows runner for staking-deposit-cli was that they checked only for
utf-8
, and Windows does not doutf-8
.