vectorgraphics / asymptote

2D & 3D TeX-Aware Vector Graphics Language
https://asymptote.sourceforge.io/
GNU General Public License v3.0
533 stars 89 forks source link

unicode file name is not supported on Windows system #371

Open DailyShana opened 1 year ago

DailyShana commented 1 year ago

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-170

method 2: using CommandLineToArgvW with GetCommandLineW 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

jamievlin commented 8 months 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)