Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows - The system cannot find the path specified when umlaut in path #21994

Open
JulianBohne opened this issue Nov 20, 2024 · 1 comment
Open
Assignees
Labels
area:runner Issues tied to the scala runner command. compat:windows itype:bug

Comments

@JulianBohne
Copy link

Description

On Windows, if the user directory has an umlaut in it (e.g. 'ä'), the scala.bat file will not work properly and simply output:
The system cannot find the path specified.

Compiler version

Scala code runner version: 1.4.3
Scala version (default): 3.5.2

Minimized code

> scala

Output

The system cannot find the path specified.

Expectation

The scala repl starts:

Welcome to Scala 3.5.2 (23.0.1, Java OpenJDK 64-Bit Server VM).
Type in expressions for evaluation. Or try :help.

scala>

Fix / Workaround

There are two problems in the batch file. One is, that the umlaut 'ä' was changed to '�' on the line SET CMDLINE="C:\Users\<name with ä>.

Note: I don't know where exactly this issue stems from.

Another issue is that the code page has to be set to 65001 to execute properly.
This can be done by adding the following line at the top of the file:

@CHCP 65001>nul

The command CHCP 65001 changes the code page to 65001 and the rest disables the lines output (@echo off is not enough here).

Note: This worked for me, but could break things on other systems.

@JulianBohne JulianBohne added itype:bug stat:needs triage Every issue needs to have an "area" and "itype" label labels Nov 20, 2024
@Gedochao Gedochao added area:runner Issues tied to the scala runner command. compat:windows and removed stat:needs triage Every issue needs to have an "area" and "itype" label labels Nov 21, 2024
@Gedochao
Copy link
Contributor

@Gedochao Gedochao self-assigned this Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:runner Issues tied to the scala runner command. compat:windows itype:bug
Projects
None yet
Development

No branches or pull requests

2 participants