https://issues.dlang.org/show_bug.cgi?id=23906
kinke <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #1 from kinke <[email protected]> --- I've fixed this for LDC (AFAIK :D), by IIRC: * Switching the main() C entry point on Windows to wmain(), so that its gets the cmdline params (source files, import dirs...) in UTF16 encoding, *not* the current 8-bit code page (CP_ACP). `_d_wrun_main` in druntime then converts those to proper UTF8 strings for _Dmain(). See: https://github.com/dlang/dmd/blob/be151e6d854c0df8af7ee88b6f380b6283ea824f/compiler/src/dmd/mars.d#L872-L931 * Then redefining the `CodePage` enum in https://github.com/dlang/dmd/blob/b87b011e0c91596b9722187192416a5a6534b16f/compiler/src/dmd/root/filename.d#L46 from `CP_ACP` to `CP_UTF8`. That https://github.com/dlang/dmd/blob/be151e6d854c0df8af7ee88b6f380b6283ea824f/compiler/src/dmd/common/string.d#L140 is new to me (and missed by LDC! - thx for the link) - it should definitely use `dmd.root.filename.CodePage` instead (is currently a *private* enum). > suggesting the conversion of CreateProcessA to instead be CreateProcessW with > the help of toWStringZ Yes, all child process invocations on Windows should use the wide API. --
