winget-cli
winget-cli copied to clipboard
Unicode command-line argument parsing
Brief description of your issue
When I copy-paste the exact name of a package as reported by search containing Unicode characters, I can't install it.
Steps to reproduce
PS C:\Users\mate> winget search opencl
Name Id Version Source
--------------------------------------------------------------------
OpenCL™ and OpenGL® Compatibility Pack 9NQPSL29BFFF Unknown msstore
PS C:\Users\mate> winget install 'OpenCL™ and OpenGL® Compatibility Pack'
No package found matching input criteria.
Expected behavior
Have the package actually install
Actual behavior
CLI bails out
Environment
Windows Package Manager (Preview) v1.4.2011-preview
Copyright (c) Microsoft Corporation. All rights reserved.
Windows: Windows.Desktop v10.0.22000.795
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.19.2011.0
I think it may be an issue specifically with the Trademark sign, as I see this in my logs -
{"Filters":[{"PackageMatchField":"Market","RequestMatch":{"KeyWord":"US","MatchType":"CaseInsensitive"}}],"Query":{"KeyWord":"OpenCLTM and OpenGL® Compatibility Pack","MatchType":"Substring"}}
WinGet-2022-08-03-16-17-30.945.log
The log shows the proper characters in the invocation, and if I do just winget search "OpenGL® Compatibility Pack" I get the result as expected.