-
Notifications
You must be signed in to change notification settings - Fork 266
Closed
Description
Version
2.0.240405.15
Summary
I have a uri with Chinese character and query string that needs to be parsed with Windows.Foundation.Uri. Using C++WinRT, it always returns me an empty result. But equivalent C# code does returns me expected result.
I have tried changing the file encoding to either UTF-8 and UTF-8 BOM, nothing worked.
Reproducible example
With C++WinRT, create a C++WinRT console application:
winrt::Windows::Foundation::Uri uri{ LR"(myapp://open?file="C:/我.txt")" };
winrt::Windows::Foundation::WwwFormUrlDecoder parsed{ uri.Query() };
for (auto entry : parsed)
{
std::wcout << entry.Name().data() << L'\t' << entry.Value().data() << L'\n';
}With C#, create a UWP project:
var uri = new Uri("myapp://open?file=\"C:/我.txt\"");
var parsed = new WwwFormUrlDecoder(uri.Query);
foreach (var entry in parsed)
{
Debug.WriteLine(entry);
}Expected behavior
Actual behavior
Additional comments
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels

