Skip to content

Commit 5a61f1f

Browse files
authored
Fix Garbled message in non-English Windows
Quick fix for the issue atom-community#1166, Java build in non-English editions of Window will result garbled message, stdout and stderr displayed. This fix would have further issue: if user's final target deployment would have different encodings from all-UTF-8 setup, (such as "normal" Windows cmd.exe, they normally have ANSI encodings for average users) so testing and evaluating might become more difficult.
1 parent 443bf81 commit 5a61f1f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/grammars/java.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export const Java = {
2020
const classPackages = GrammarUtils.Java.getClassPackage(context)
2121
const sourcePath = GrammarUtils.Java.getProjectPath(context)
2222
if (windows) {
23-
return [`/c javac -Xlint ${context.filename} && java ${className}`]
23+
return [`/c javac ーJ-Dfile.encoding=UTF-8 -Xlint ${context.filename} && java -Dfile.encoding=UTF-8 ${className}`]
2424
} else {
2525
return [
2626
"-c",

0 commit comments

Comments
 (0)