audinowho / PMDODump

All content generation for PMDO. BEWARE SPOILERS.
MIT License
62 stars 13 forks source link

PMDO fails in a folder containing non-ascii characters #337

Open issuebotaudinowho[bot] opened 1 year ago

issuebotaudinowho[bot] commented 1 year ago

Discord: shitpost_sunkern#0 <@292039958829727744>

Bug: PMDO.exe won't run if inside a folder containing non-ASCII characters

audinowho commented 1 year ago

From @antymew

technical explanation: https://github.com/NLua/KeraLua/blob/main/src/NativeMethods.cs#L393 when calling a C function from C#, C# marshals strings as proprietary windows ANSI instead of UTF-8. when a character does not exist in windows ANSI, it attempts to find a "best fit" for the character, by trimming diacratics, or by outright replacing it with a question mark. NLua doesnt have this problem with strings within a script because theyre instead passed as a byte array, but it was overlooked in the function to load and execute a script