Skip to content
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

[windows] UTF-8 Console IO #1131

Open
codehz opened this issue Mar 31, 2024 · 1 comment
Open

[windows] UTF-8 Console IO #1131

codehz opened this issue Mar 31, 2024 · 1 comment

Comments

@codehz
Copy link

codehz commented Mar 31, 2024

updated:
I think it is possible to use only
SetConsoleCP / SetConsoleOutputCP without embedding the manifest... since all other api is using either Nt version or W version (which use wide string already)

original:

https://learn.microsoft.com/en-us/windows/apps/design/globalizing/use-utf8-code-page

The problem: without this, many program that output character outside ansi will produce garbage characters
(including --strace output)

Yes, it is possible to use Beta: Use Unicode UTF-8 for worldwide language support but many GDI program will break as it doesn't support UTF-8 per process

@codehz codehz changed the title [windows] Add UTF-8 Manifest to binary [windows] Add UTF-8 Manifest to executable Mar 31, 2024
@G4Vi
Copy link
Collaborator

G4Vi commented Apr 5, 2024

Unicode strace output could also potentially be fixed for all Windows in our support vector by modifying klog to convert to UTF-16 and print using WriteConsoleW when possible instead of WriteFile. If there isn't enough stack space available to convert to UTF-16 it would have to fallback to existing behavior

@codehz codehz changed the title [windows] Add UTF-8 Manifest to executable [windows] UTF-8 Console IO Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants