advpl-testsuite
advpl-testsuite copied to clipboard
[question] Colors do not display on console.log. Am I missing something?
I just ran Expect suite in tests. The result was:
Do I have to configure anything else to see the colors?
This is weird. It looks like the terminal emulator under AppServer is not seeing 0x33
(27) as the escape code, but trying to give the ASCII representation of it. What is the version of your AppServer?
Windows Operating System version 6.2.9200
[INFO ][SERVER] [Thread 9676] [SMARTHEAP] Version 8.0.0 *** TOTVS S.A. *** *** www.totvs.com.br ***
- TOTVS - Build 7.00.131227A - Jul 21 2017 - 15:20:14 NG
- Build: 32 bits
- RPO Format: 32 bits
- SVN Revision: 9837 - 14595 - 1902
- Build Version: 13.2.3.16
Maybe it's related to file encoding? I tried changing from and to UTF-8 and windows1252 but the result is the same.
Well... I tried to update my bin with the following
Windows Operating System version 6.2.9200
Windows Operating System version 6.2.9200
[INFO ][SERVER] [Thread 7364] [SMARTHEAP] Version 8.0.0 *** TOTVS S.A. *** *** www.totvs.com.br ***
- TOTVS - Build 7.00.131227A - Jan 23 2018 - 15:25:33 NG
- Build: 32 bits
- RPO Format: 32 bits
- SVN Revision: 10530 - 16249 - 1974
- Build Version: 13.2.3.28
'TOTVS Easy Sales 12' console mode. Press Ctrl+Break to terminate.
*** STARTING SERVER WITH MAXIMUM STRING SIZE LIMIT SET TO 10 MB. ***
---------------- OS System Info ----------------------------------------------- OS Version .........: Windows 8 [Version 6.2.9200] OS Platform ........: Windows NT Based (x64) OS Version Info ....:
But, until now, no luck with the colors.
I'm on windows 10 btw...
What are your configurations?
Good news! I managed to get it working. The problem is with windows10.
The colors in terminal are now off by default. The only way I found to fix it was changing a registry key
This link shows some info: https://wpdev.uservoice.com/forums/266908-command-prompt-console-bash-on-ubuntu-on-windo/suggestions/15617610--re-enable-enable-virtual-terminal-processing-by
The Registry Key:
Set "VirtualTerminalLevel" to 0x1 in ‘HKCU\Console’
VirtualTerminalLevel REG_DWORD The level of VT support provided by the Windows Console Host
Would be great this info in readme
...
Good news! I managed to get it working. The problem is with windows10.
The colors in terminal are now off by default. The only way I found to fix it was changing a registry key
This link shows some info: https://wpdev.uservoice.com/forums/266908-command-prompt-console-bash-on-ubuntu-on-windo/suggestions/15617610--re-enable-enable-virtual-terminal-processing-by
The Registry Key:
Set "VirtualTerminalLevel" to 0x1 in ‘HKCU\Console’
VirtualTerminalLevel REG_DWORD The level of VT support provided by the Windows Console Host
olá @izacsc ! Nas chaves de registros do Windows já existia a "VirtualTerminalLevel" ? Eu criei ela, porque no meu PC não existia ainda, mas mesmo assim não muda a cor de impressão no console. Alguma sugestão @izacsc, @haskellcamargo, @vitorebatista ?
Não existia não. Criei e funcionou. Não me lembro, mas provavelmente tive que reiniciar a máquina para funcionar. Confere também se vc criou no lugar certo:
Criei esta chave e funcionou no meu ambiente, obrigado pela resposta!