Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
izacsc opened this issue Feb 22, 2018 · 8 comments
Open

Comments

@izacsc
Copy link
Contributor

izacsc commented Feb 22, 2018

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

image

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

@izacsc izacsc changed the title [question] I'm I missing something? [question] Am I missing something? Feb 22, 2018
@izacsc izacsc changed the title [question] Am I missing something? [question] Colors do not display on console.log. Am I missing something? Feb 22, 2018
@haskellcamargo
Copy link
Contributor

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?

@izacsc
Copy link
Contributor Author

izacsc commented Feb 23, 2018

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
Copy link
Contributor Author

izacsc commented Feb 23, 2018

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
Copy link
Contributor Author

izacsc commented Feb 26, 2018

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

@vitorebatista
Copy link
Contributor

Would be great this info in readme...

@LeonardoRios
Copy link

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 ?

@izacsc
Copy link
Contributor Author

izacsc commented Oct 30, 2018

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

@rodolfoag
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants