Closed onenowy closed 1 year ago
Oh oops, that's what I get for assuming stuff when working with strings. Do the P/Invoke functions work fine with multibyte characters? I'd assume so since it takes in bytes directly, but just want to double check.
Also I don't really like using default anything when it comes to .NET, especially when it comes to globalization/localization because they always mess it up. Would using Encoding.Unicode suffice?
I have realized looking at the code now that I contradicted my old self when talking about Encoding.Default, but I'm a better person now! I've also realized that I haven't done any sort of error checking in the function, so good job for finding this mistake.
Alright, I have figured it out. I'm gonna merge this pull request and do some changes after. Thank you.
Thanks, I'm glad to help.
Some languages consume 3 bytes per character. char type is not enough for these languages.