Wanted to report something that might potentially be a bug. A user from Turkey in our forum, reported a problem with a WASM module failing to load with this error:
Now, please pay attention to his username, it’s not Msi (with a normal “i” at the end), it’s Msı, the letter at the end is not a regular “i”, but it’s the “Latin Small Letter Dotless I”, with a Unicode code of U+0131, and it’s binary encoded in UTF-8 as C4 B1
The user confirmed that, as soon as he changed his Windows username from Msı to Msi, using a regular “i” at the end, the problem was fixed and he was able to load the WASM module normally.
Wow, that is surprising. After all, Windows has been UTF-16-based for a very long time, one would think all APIs used by the simulator are Unicodes ones, not ancient “ANSI” ones, and that non-ASCII letters would not cause any problem.
The _A ones are actually back in favour now and the mechanism by which UTF-8 support has been added to the Win32 API Use UTF-8 code pages in Windows apps - Windows apps | Microsoft Learn. The “Beta version: Use UTF-8 for language compatibility” option mentioned in davux3’s topic above switches the system code page used by the _A APIs to UTF-8.
Whoa, I had not been paying attention. UTF-8 is finally becoming a thing for real in Win32. Back in the days when I did Win32 coding, the UTF-8 codepage could mostly just be used for conversion between UTF-8 and UTF-16, if I recall correctly.