https://bugs.winehq.org/show_bug.cgi?id=48174
--- Comment #5 from Vincent Povirk madewokherd@gmail.com --- What I mean is that Mono's StringToHGlobalAnsi is using utf8 when it probably should be using CP_ACP (and I believe it does currently use its own code to do the conversion).
I'm just trying to figure out and give a complete explanation (and hopefully fix) what's happening. I'm not necessarily giving you advice or trying to say the program is wrong. Obviously, it works on Windows, so we're almost certainly doing something wrong.