Closed Nightenom closed 2 months ago
I think the only real solution to this is to just not print these fancy characters under an unsupported encoding. Windows charsets don't support fancy characters like these, as they're all single byte charsets that don't support more than 127 characters beyond ASCII.
To summarize a little bit here:
When running under Gradle, the actual chain of output looks like this:
In this setup, we have no code running in the Gradle process that is attached to a real console, and cannot change its codepage or cause it to write to the console directly. Sadly that means there is no way for us to fix this.
I opened a Gradle issue for this: https://github.com/gradle/gradle/issues/29356
Since we cannot fix this, I am disabling Emojis for NFRT on Windows and keep them enabled for OSX and Linux. Sole exception: When I detect that I am running via Eclipse or via IntelliJ, I'll enable the Emojis since we know those two redirect the output and do not use a real console.
Running commands in Windows 11 cmd.exe might suffer from default charset not being utf-8, one can switch using
chcp 65001
but setting that globally is still beta (see first image in https://stackoverflow.com/a/57134096) My default chcp is 852, but generally that depends on Windows languagechcp 852
:chcp 65001
: