Possible issue with WASM and username encoding

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:

WASM: Error -239 / ffffff11
WASM: ERR_FATAL_FILE_ERROR (-239 / ffffff11)

This doesn’t seem to be common but, a search on the MSFS users forum returned this:

So, I asked the user to provide his username and the locations where MSFS has been installed, which are standard for an MS Store installation:

C:\XboxGames\Microsoft Flight Simulator
C:\Users\Msı\AppData\Local\Packages\Microsoft.FlightSimulator_8wekyb3d8bbwe\LocalCache\Packages
C:\Users\Msı\AppData\Local\Packages\Microsoft.FlightSimulator_8wekyb3d8bbwe\LocalCache\Packages\Community

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.

1 Like

This has also come up again recently for some of our users, but I didn’t get any confirmation of the fix yet like you did.

This is presumably the same issue that seemed to have been fixed some SU ago?

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.

1 Like

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.

1 Like

Bumping this. We do still see occasional reports of this issue.

Hello,

This issue is tracked.
Thank you for reporting the problem.

Regards,
Sylvain

1 Like