SBT Launcher on Windows and Java 9+ fails on non-ASCII user dirs #7192
Labels
area/runner-script
issues around sbt-the-bash-script, or bat script
area/windows
Windows-specific issue
Bug
help wanted
steps
C:/Users/João
)sbt
(with java 9 or higher)problem
expectation
notes
The error comes from the way batch files interact with UTF-8 and files.
From a quick investigation, the problem is in the following lines:
%TEMP%.\rtext.txt
is, in my case, correctly pointing toC:\Users\JOO~1\AppData\Local\Temp.\rtext.txt"
"!_JAVACMD!" !_JAVA_OPTS! !_SBT_OPTS! -jar "!sbt_jar!" --rt-ext-dir > "%TEMP%.\rtext.txt"
writes the directory tortext.txt
as"C:\Users\João\.sbt\1.0\java9-rt-ext-eclipse_adoptium_19_0_2"
encoded aslatin1[dos]
, with theã
encoded asE3
"C:\Users\JoÒo\.sbt\1.0\java9-rt-ext-eclipse_adoptium_19_0_2
, but that might be my terminal configuration)if not exist "!java9_rt!"
, as it cannot find the filemkdir "!java9_ext!"
fails, as the pah is invalidNote that everything seems to work if I force
set java9_ext= < "C:\Users\JOO~1\.sbt\1.0\java9-rt-ext-eclipse_adoptium_19_0_2"
.I tried other encodings, but was unsuccessful.
The text was updated successfully, but these errors were encountered: