Issue 12898 - std.process.browse expects URL to be encoded in CP_ACP on Windows instead of UTF-8

Use Unicode version of `ShellExecute` in `std.process.browse`.
Also remove needless `ShellExecuteA` declaration.
This commit is contained in:
Denis Shelomovskij 2014-06-12 17:23:30 +04:00
parent ccdfd1ecca
commit 176f1246f3

View file

@ -3435,15 +3435,11 @@ version (Windows)
{
import core.sys.windows.windows;
extern (Windows)
HINSTANCE ShellExecuteA(HWND hwnd, LPCSTR lpOperation, LPCSTR lpFile, LPCSTR lpParameters, LPCSTR lpDirectory, INT nShowCmd);
pragma(lib,"shell32.lib");
void browse(string url)
{
ShellExecuteA(null, "open", toStringz(url), null, null, SW_SHOWNORMAL);
ShellExecuteW(null, "open", toUTF16z(url), null, null, SW_SHOWNORMAL);
}
}
else version (OSX)