How to recognize ansi color escape codes in Windows7 64 bit command terminal

只谈情不闲聊 提交于 2019-11-28 04:25:37

问题


I have tried Ansicon and I still cannot get ansi escape sequences to become recognized and interpreted in my CMD.EXE command prompt on Windows 7 64 bit. Has anyone been able to work this correctly and get a colorized console with this OS?


回答1:


I ran into the same problem today, and found a workaround.

The commandline utility Windows ANSI Color detects ANSI color codes and sets the corresponding console color.

Example:

myapp.bat | wac

where wac is the Windows ANSI color utility




回答2:


Ansicon use dll injection in order to enable ansi color in cmd.exe, which is disabled with the standard user privileges.

Try launching ansicon with "run as administrator" (right click)




回答3:


I've played a lot with this, and the best console for me is FarManager on Windows. http://www.farmanager.com/

It's a file manager, but with CTRL+O you will get the console, and very handy with full support of ANSI, autocomplete, etc.




回答4:


ANSICON (source) seems to work fine for me...

  • Put ansicon somewhere you intend to keep it...
  • Run ANSICON -I
  • Close the terminal
  • Open a new one...


来源:https://stackoverflow.com/questions/2294281/how-to-recognize-ansi-color-escape-codes-in-windows7-64-bit-command-terminal

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!