views:

205

answers:

1

I am using CMAKE with CTEST to run my regressions. My application is a console app which outputs in whatever encoding it is presented by it's environment (A feature of Tcl).

How do I tell visual studio that when it runs my application to run it in a utf-8 environment. Right now my regression results are encoded in latin, and it makes it difficult to compare with regressions on my linux builds.

+1  A: 

The stdout/stderr streams do not support unicode, so Visual Studio has no way of receiving unicode output from your process. This was an issue MS had to work around when implementing Unicode support in VS 2005, see this blogpost. In short, cl.exe uses a set of pipes to write unicode output to the Visual Studio console window.

Your wrapper could either convert the output of your process into the system code-page, or figure out how to open the Unicode pipes used by cl.exe and write to them instead.

JesperE