Open DailyShana opened 1 year ago
As of the moment, the master branch is built with linux in mind and Windows is ported using Cygwin. Right now, I am proprosing a re-port of Asymptote built with Windows API (with clang64 compiler) without Cygwin. This should enable a fix if my re-port is merged in (see https://github.com/jamievlin/asymptote/tree/clang64-msys2-win-support)
there are severel ways to solve it.
method 1: using
wmain
to get correct file name (wchar_t* argv[]
) which is encoded in utf16, then transform it to utf8. ref: https://learn.microsoft.com/en-us/cpp/c-language/using-wmain?view=msvc-170method 2: using
CommandLineToArgvW
withGetCommandLineW
to get file name which is encoded in utf16, then transform it to utf8. ref: https://learn.microsoft.com/en-us/windows/win32/api/shellapi/nf-shellapi-commandlinetoargvw