microsoft / winget-cli

WinGet is the Windows Package Manager. This project includes a CLI (Command Line Interface), PowerShell modules, and a COM (Component Object Model) API (Application Programming Interface).
https://learn.microsoft.com/windows/package-manager/
MIT License
23.37k stars 1.45k forks source link

Fix issue with unicode characters in symlink target path #4834

Closed ryfu-msft closed 2 months ago

ryfu-msft commented 2 months ago

Resolves #3312

Fixes an issue when creating a symlink with a target path that includes unicode characters by converting the symlink target path to a UTF16 string prior to creation.

Added a test that includes unicode characters in the symlink target path and verified that install and uninstall are both supported.

Microsoft Reviewers: Open in CodeFlow
yao-msft commented 2 months ago

There are a few more places to be updated, where we directly create std::filesystem::path from SymlinkTarget

MagicAndre1981 commented 1 month ago

when can we get a new preview to test this?

denelon commented 1 month ago

We're getting ready to cut a release candidate for WinGet 1.9 and we'll start cutting WinGet 1.10 preview builds shortly after. ETA is early next week.

MagicAndre1981 commented 1 week ago

@denelon the fix works fine in latest 1.9 stable versions, but I think the yt-dlp issue is similar. Can this be also fixed? All path strings in code should be checked for such unicode issues.

denelon commented 1 day ago

If:

is resolved, then can you make a new issue calling out where you're seeing unicode so we can track that issue separately?

That way we can close 161349.

MagicAndre1981 commented 1 day ago

then can you make a new issue calling out where you're seeing unicode so we can track that issue separately?

I found that there is already an old issue about unicode issues, so there is no need for creating a new one.

denelon commented 1 day ago

@MagicAndre1981 thanks. I added it to the WinGet project to make sure we get that one fixed sooner rather than later.