Weird control characters from Gradle in Windows 10

I'm guessing you could pass --console plain in the gradle command line to disable the rich console which is likely the cause of the "funky" characters

https://docs.gradle.org/current/userguide/gradle_command_line.html


I've seen this happen in the Git BASH shell that's part of Git For Windows. For me, the solution was to set TERM to cygwin. This fixed the output without introducing any issues handling backspace.

export TERM=cygwin

I also tried xterm, xterm-256color, ansi, and vt100. The cygwin term has been the most reliable for me. I'm now running \usr\bin\bash.exe in Windows Terminal, and so far it has worked well.