advpl-testsuite icon indicating copy to clipboard operation
advpl-testsuite copied to clipboard

[question] Colors do not display on console.log. Am I missing something?

Open izacsc opened this issue 7 years ago • 8 comments

I just ran Expect suite in tests. The result was:

image

Do I have to configure anything else to see the colors?

izacsc avatar Feb 22 '18 19:02 izacsc

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?

haskellcamargo avatar Feb 22 '18 20:02 haskellcamargo

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.

izacsc avatar Feb 23 '18 13:02 izacsc

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?

izacsc avatar Feb 23 '18 17:02 izacsc

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

izacsc avatar Feb 26 '18 14:02 izacsc

Would be great this info in readme...

vitorebatista avatar Feb 26 '18 14:02 vitorebatista

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 ?

LeonardoRios avatar Oct 30 '18 05:10 LeonardoRios

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:

image

image

izacsc avatar Oct 30 '18 12:10 izacsc

Criei esta chave e funcionou no meu ambiente, obrigado pela resposta!

rodolfoag avatar Jun 23 '20 15:06 rodolfoag