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.25k stars 1.45k forks source link

Broken symlinks created for non-latin character usernames #3312

Closed romme closed 1 month ago

romme commented 1 year ago

Brief description of your issue

Users with unicode characters in their usename can't use symlinks that Winget creates to launch installed apps because the username portion of the symlink is garbled.

Steps to reproduce

Have a non English username: $env:USERPROFILE -match '\\[a-z]+$' should return False. Install an app: winget install rclone.rclone

Expected behavior

A working symlink.

Actual behavior

PS C:\> ls $env:LOCALAPPDATA\Microsoft\Winget\Links

    Directory: C:\Users\Роман\AppData\Local\Microsoft\WinGet\Links

Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
la---          06.06.2023    13:08              0 rclone.exe -> C:\Users\Роман\AppData\Local\Microsoft\WinGet\Pack
                                                  ages\Rclone.Rclone_Microsoft.Winget.Source_8wekyb3d8bbwe\rclone-v1.62
                                                  .2-windows-amd64\rclone.exe

Environment

Windows Package Manager v1.4.11071
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.19045.2965
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.19.11071.0
MagicAndre1981 commented 10 months ago

any update on this? I have the same for German Umlaute and french chars like "é"

If I delete the old broken symlinks and create them on my own with Link Shell Extension they work and I can launch the cli apps fine.

MagicAndre1981 commented 4 months ago

Any updates on this @denelon . Having to recreate the symlinks always on my own annoys me a lot.

kjo-sdds commented 2 months ago

Any news on that ????

MagicAndre1981 commented 2 months ago

I still create all symlinks manually after update with Link Shell Extension. It is annoying, but works.

kjo-sdds commented 2 months ago

Yeah well I used the env var tool from powertoys to edit it pretty easily ... but .. it's still pretty annoying ... especially when you forget about it (cause hey 2024 ... and we still have problem with pretty basic alphabet !) and then spend 1/2h figuring out why the tool you just installed doesn't work ...

By the way my problem is not in the Link directory but in the path env variable linking to : C:\Users\USER_WITH_é\AppData\Local\Microsoft\WinGet\Packages\PACKAGE_ID

But ... it was still flagged as dupplicate and closed so ... I elaborate here ^^

MagicAndre1981 commented 2 months ago

Yes, same for me with é in André so my user path is C:\Users\André\AppData\Local\Microsoft\WinGet\Packages

florian-krueger commented 2 months ago

Hi, Florian Krüger here... problem obvious ^^