on-internet
← Community

Windows ANSI terminal commands do not work on some WIndows installs

Stack Overflow ·

I am using a Java program which uses ANSI color codes to print on the Console. However in some Windows installs the terminal colors are correctly shown, and in some other they are not. For example with the following code: System.out.println("The \u001B[34mBlue text\u001B[0m"); System.out.println("The \u001B[31m\u001B[1mRed bold text\u001B[0m"); On some Windows installs I have the expected result, but on others (such on mine current which is Windows 11 Family) I have: Is there a configuration to set on Windows to allow ANSI codes to be taken into account?

Comments

Sign in or sign up to comment and upvote.

No comments yet.