From c6830ac1e54b1f8fd3985c5fe595a835ad56046a Mon Sep 17 00:00:00 2001 From: Guillaume Nodet Date: Thu, 27 Apr 2017 16:15:27 +0200 Subject: [PATCH] Use english locale when converting to lower case --- jansi/src/main/java/org/fusesource/jansi/AnsiConsole.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jansi/src/main/java/org/fusesource/jansi/AnsiConsole.java b/jansi/src/main/java/org/fusesource/jansi/AnsiConsole.java index 547daa81..01d95b02 100644 --- a/jansi/src/main/java/org/fusesource/jansi/AnsiConsole.java +++ b/jansi/src/main/java/org/fusesource/jansi/AnsiConsole.java @@ -27,6 +27,7 @@ import java.io.PrintStream; import java.io.UnsupportedEncodingException; import java.nio.charset.Charset; +import java.util.Locale; /** * Provides consistent access to an ANSI aware console PrintStream. @@ -42,7 +43,7 @@ public class AnsiConsole { public static final PrintStream system_err = System.err; public static final PrintStream err; - private static final boolean IS_WINDOWS = System.getProperty("os.name").toLowerCase().contains("win"); + private static final boolean IS_WINDOWS = System.getProperty("os.name").toLowerCase(Locale.ENGLISH).contains("win"); private static final boolean IS_CYGWIN = IS_WINDOWS && System.getenv("PWD") != null