Skip to content

fix: use USERPROFILE on Windows for non-ASCII username support#2450

Open
Bhumika-SN wants to merge 2 commits intojbangdev:mainfrom
Bhumika-SN:fix/windows-non-ascii-username-path
Open

fix: use USERPROFILE on Windows for non-ASCII username support#2450
Bhumika-SN wants to merge 2 commits intojbangdev:mainfrom
Bhumika-SN:fix/windows-non-ascii-username-path

Conversation

@Bhumika-SN
Copy link
Copy Markdown

Problem

On Windows, users with non-ASCII characters in their username (common
in many countries including India, China, Eastern Europe) experience
broken PATH setup and jbang failing completely.

Root cause: Java's System.getProperty("user.home") can return a
corrupted path on Windows when the username contains non-ASCII characters.

Fix

On Windows, prefer USERPROFILE environment variable over user.home
as it always returns the correct path regardless of username characters.

Related Issue

Fixes #1110

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

jbang on PowerShell handles non-ASCII characters in home directory badly

1 participant