Funny characters in Visual Studio output window

2019-06-05 18:28发布

I have written an External Tool that uses plink.exe to execute gcc on a Linux system and then capture the output back on VS's output window (there is a checkmark in Tools/External Tools/Use Output Window). But Linux outputs with UTF-8 and so I get some garbage. Is there any way to get VS to translate that UTF-8 output to readable output?

For example, Linux is trying to output this:

test.c:214: warning: conflicting types for ‘test_zero_read’

but it shows up in VS's output window like this:

test.c:214: warning: conflicting types for ‘test_zero_read’

2条回答
等我变得足够好
2楼-- · 2019-06-05 18:45

pipe the output on the linux box via unix2dos before finishing.

Edit: another go:

iconv -f utf8 -t iso89 oldfile > newfile

(from here)

查看更多
时光不老,我们不散
3楼-- · 2019-06-05 18:55

Changing the font of the output window can also address the issue of the characters.
In VS go to Tools -> Options -> Environment -> Fonts and Colors ->Show Settings for: Output Window

查看更多
登录 后发表回答