The other day, colleague David noticed:
Hi all,
Does anybody know off-hand if launching Explorer programmatically (using either ShellExecute or ShellExecuteEx) should fail to open a directory containing surrogate pairs?
If I first create a directory, say, “c:\コンポ𠮷𠮟㐂“, and then run…
ShellExecuteW(NULL, L"open", L"explorer", L"c:\\コンポ𠮷𠮟㐂", NULL, SW_SHOWNORMAL);
Then ShellExecute succeeds and Explorer opens, but it just punts and opens My Documents.
If I try the above with any other existing path that does not contain surrogates (like “c:\test” or even “C:\コ㐂”) then the Explorer opens in the requested directory.
This occurs on both Win7 and Win8. Is this an expected limitation with surrogate pairs?
Thanks,
David
He's right, it doesn't find supplementary paths.
I doubt it is actually ShellExecuteW, for what it's worth.
Something to do with the verb syntax, or how NTFS indexes the files, or more likely the way Explorer searches them, maybe?
Depressing that even in Windows 8 such problems exist.
A good bug with surrogate pairs and supplementary caracters, in any case!