ANSI escape sequences aren't printed to stdout on Windows
问题 I'm trying to write an ANSI escape sequence to stdout using node.js on Windows, but it does not appear to work. Specifically, I use ConEmu which does support a subset ANSI codes. I've created a test file which should rename the current console tab: process.stdout.write('\x1b]9;3;"abc"\x1b\x5c'); However, nothing happens when I run it. If I run node test > out.txt , the correct bytes are written to the output file. Why don't the escape sequences work? 回答1: When node's stdout is connected to a