I'm using cypress for test automation and when running a test spec from the Git for Windows bash terminal I get weird characters in the results output:
cypress spec run in Git for Windows bash -
If I run cypress from a Windows command prompt the output characters are correct:
cypress spec run in Windows Command Prompt -
I'm using Windows 7, cypress 5.1.0, and Git for Windows 2.28.0 with mintty 3.2.0
Any thoughts on how to correct this?


The issue is described in this GitHub issue.
The problem is that Cypress is sending UTF-8 encoded text through its
stdoutwhich is mangled by Windows before being received by Mintty (which is what hostsbashand runsgiton Windows).I understand that Mintty doesn't yet instruct Windows to not mangle the
stdoutit processes - (cmd.exedoes, however, which is why it works there) - but we can do that ourselves by changing our Windows OEM Code Page setting using thechcpprogram (located atC:\Windows\System32\chcp.comand yes, that's a.com, not.exe). You can add a command to your.bashrcfile so it will always run when you fire up Mintty:Open mintty on Windows - presumably this starts a bash shell.
Go to your home directory (i.e.
cd ~)Open or create a
.bashrcfile.Put this in the file (update the path to your
chp.comprogram as appropriate):Then restart the terminal window and it should work.