-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
curl: revert #3011 and write UTF-8 in current console code page. #3212
Conversation
1d39418
to
f62e1ab
Compare
Based on past experience changing the codepage may even result in locked up consoles on certain systems. This was a case I could never actually reproduce locally but it started to happen for multiple users after deploying a similar solution. Another related issue was when execution stopped abnormally (e.g. via Ctrl+C) skipping the CP restoration code. But, even with a Ctrl+C handler, the locking/garbled console issues weren't fully resolved. The solution back then was exactly the same as above, using the |
There's just some code style nits that travis points out:
|
Interestingly enough, this causes test 1426 to fail in appveyor builds. Test 1426 does this:
and the body of the response contains 5 bytes. A binary zero, and then |
Ah, is_tty become TRUE when DEBUGBUILD. |
Could you please teach me how to run test just test1426? |
See also https://curl.haxx.se/dev/runtests.html. |
@MarcelRaad Thank you. It seems tests are passed. |
Thanks! |
Current implementation for output UTF-8 on Windows console doesn't restore font. Windows console set font to suitable possibly. And restoring code page also set suitable font. So font is not restored correctly. At least, this implementation doesn't work on Japanese locale on Windows. To write UTF-8 without changing console code page, it should use Wide String APIs. If output stream is not a TTY, do original behavior. Thanks.
You notice some borders in this screenshot are not displayed in correct location. This is problem of fonts not curl. If you set Raster Font for the console, it probably works well.
Fixes #3211