-
Notifications
You must be signed in to change notification settings - Fork 8.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
ReadConsole does not work with utf-8 codepage #16020
Comments
Are you using I'd bet this is the thing that @lhecker just re-wrote the entire input buffer to fix |
I use |
By the way, the problem is the same both for the Windows Terminal and the Windows Console Host. |
@tholp Some parts of your comments must be incorrect. You write that your buffer contains:
And you said (emphasis mine):
If you had truly used the
= There should be 0x00 high bytes for each 16-bit integer. So either you used the Furthermore, when you say:
how did you enter that string? Did you enter it regularly with your keyboard or did you use |
Sorry, you are right. My code actually obtains the (bad) bytes using Running |
Ah I see... In that case your issue is fixed by the combination of #14745 and #15783. The former fixes UTF-8 not working via I'll mark it as a /duplicate of #14745, because that one affects you more than the other. |
Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report! |
Yes, that sounds exactly like my issue. Thank you, and once more: sorry for the confusion with Not sure I can test it until the change is in the public version (I have in any case updated our software to get the right result). |
Windows Terminal version
No response
Windows build number
No response
Other Software
No response
Steps to reproduce
Use SetConsoleCP to use utf-8 (or if in utf8 beta-mode in windows).
Read using ReadConsole
Inputting "abcæøå" the input buffer will contain 0x61 0x62 0x63 0x00 0x00 0x00 0xD 0x0A
Expected Behavior
utf-8 characters for the letters æøå.
Actual Behavior
nulls
The text was updated successfully, but these errors were encountered: