fusesource / jansi

Jansi is a small java library that allows you to use ANSI escape sequences to format your console output which works even on windows.
http://fusesource.github.io/jansi/
Apache License 2.0
1.11k stars 140 forks source link

Use unicode escape key #156

Closed AllanWang closed 5 years ago

AllanWang commented 5 years ago

I'm not sure if it's a problem with kotlin, but when using this library, the colors don't seem to change. However, switching from \033 to \u001B did the trick.

Looking online, it appears that the two are equivalent. If using the unicode variant doesn't cause additional problems, perhaps this library could make the change to support more languages/consoles?

AllanWang commented 5 years ago

Example

image

AllanWang commented 5 years ago

Another test on travis

https://travis-ci.com/AllanWang/GitDroid/jobs/210156547#L2595

AllanWang commented 5 years ago

I'm not sure why but I tried again and it works

https://travis-ci.com/AllanWang/GitDroid/builds/116568054