[windows] UTF-8 Console IO
Author: codehzCreated Mar 31, 2024Updated May 28, 2026
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 supportbut many GDI program will break as it doesn't support UTF-8 per process
Source: jart/cosmopolitan