Skip to content

Problem with umlauts in usernames #162

Closed
@shochdoerfer

Description

Background Information:

  • Build: 19042.685 (Windows 10 Version 20H2)
  • WSL: Ubuntu 20.04
  • Version: 3.2.1 (installed via PPA)

Describe the bug
I try to create a shortcut with wslusc and it fails because my username contains an umlaut.

To Reproduce
My username created by Windows is StephanHochdörfer - In WSL2 I can commands like this ls -al /mnt/c/Users/StephanHochdörfer/ without any problems.

This is the wslu command I try to execute: wslusc -g -n MyApp /opt/myapp/bin/myapp.sh

This is the output of wslusc:

[warn] wsl.ico not found in Windows directory. Copying right now...
mkdir: cannot create directory '/mnt/c/Users/StephanHochd\224rfer/wslu': No such file or directory
cp: cannot create regular file '/mnt/c/Users/StephanHochd'$'\224''rfer/wslu': No such file or directory
[info] wsl.ico copied. Located at "/mnt/c/Users/StephanHochd�rfer/wslu".
[warn] wsl-term.ico not found in Windows directory. Copying right now...
mkdir: cannot create directory '/mnt/c/Users/StephanHochd\224rfer/wslu': No such file or directory
cp: cannot create regular file '/mnt/c/Users/StephanHochd'$'\224''rfer/wslu': No such file or directory
[info] wsl-term.ico copied. Located at "/mnt/c/Users/StephanHochd�rfer/wslu".
[warn] wsl-gui.ico not found in Windows directory. Copying right now...
mkdir: cannot create directory '/mnt/c/Users/StephanHochd\224rfer/wslu': No such file or directory
cp: cannot create regular file '/mnt/c/Users/StephanHochd'$'\224''rfer/wslu': No such file or directory
[info] wsl-gui.ico copied. Located at "/mnt/c/Users/StephanHochd�rfer/wslu".
[warn] runHidden.vbs not found in Windows directory. Copying right now...
mkdir: cannot create directory '/mnt/c/Users/StephanHochd\224rfer/wslu': No such file or directory
cp: cannot create regular file '/mnt/c/Users/StephanHochd'$'\224''rfer/wslu': No such file or directory
[info] runHidden.vbs copied. Located at "/mnt/c/Users/StephanHochd�rfer/wslu".
mv: cannot move '/mnt/c/Users/STEPHA~1/AppData/Local/Temp/MyApp.lnk' to '/mnt/c/Users/StephanHochd'$'\224''rfer/OneDrive - Company/Desktop': No such file or directory
[info] Create shortcut MyApp.lnk successful

Expected behavior
The files should get created without a problem.

Additional context
It looks like wslvar needs to handle umlauts. When running wslvar -s USERPROFILE I get C:\Users\StephanHochd�rfer as the output.

Metadata

Assignees

No one assigned

    Labels

    BugThis is either an issue that describes a bug or a PR that resolves a bugStatus: Pending ReleaseThis is fixed but not yet released.Target: 3.xThis is targeted to the 3.x version.Target: LTSThis is targeted to the LTS release.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions