mirror of
https://github.com/dlang/phobos.git
synced 2025-04-28 06:00:35 +03:00
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:
parent
ccdfd1ecca
commit
176f1246f3
1 changed files with 1 additions and 5 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue