Closed balloondude2 closed 2 months ago
I've tried to do some reading around this and other options. I found two main links from Microsoft about this:
setLocale
https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/setlocale-wsetlocale?view=msvc-160#utf-8-supportBoth achieve similar goals in different ways. The manifest one "feels" like a better approach in the sense that UTF-8 is enabled the moment the program executes, where as setLocale
isn't valid until it is called in code at runtime. However, the manifest change requires users to be on a specific version of Windows to leverage it, where as setLocale
can be statically linked so that it supports more Windows versions.
Considering you call setLocale
basically as early as possible, I think it would probably be safe to just try this first and see if user reports die down.
This PR fixes Issue #525 and allows 2ship to properly launch when there are non-ascii characters (such as þ) in the file path. I'm not sure if this was a Windows-only problem, but Windows is the only thing I can test.
I'm not sure if I put the changes in the best spot (src > code > main.c), so I'm open to moving those lines somewhere else if it's more appropriate.
Before:
After:
Build Artifacts