I'm trying to properly format the text inside the Visual Studio 2010 output window. I've research a few options and none of them work, either because I couldn't figure out how to implement a solution or the attempted solution didn't work.
The problem
Text encoding in the Visual Studio Output Window seems to 'break' versus output in a DOS prompt or Cygwin prompt. How can I correct this for Visual Studio 2010?
Example of problem in Output window:
1> ./singleCDL.h: In function ΓÇÿstatus checks::IsFileEDL(char*)ΓÇÖ:
1> ./singleCDL.h:360: warning: deprecated conversion from string constant to ΓÇÿchar*ΓÇÖ
1> ./singleCDL.h: In function ΓÇÿvoid checks::LogSparksUsage()ΓÇÖ:
1> ./singleCDL.h:400: warning: deprecated conversion from string constant to ΓÇÿchar*ΓÇÖ
1> ./CBSD_EDL_to_CDL.C: At global scope:
1> ./CBSD_EDL_to_CDL.C:135: warning: deprecated conversion from string constant to ΓÇÿchar*ΓÇÖ
1> ./CBSD_EDL_to_CDL.C:137: warning: deprecated conversion from string constant to ΓÇÿchar*ΓÇÖ
The exact same output in DOS & Cygwin:
./singleCDL.h: In function ‘status checks::IsFileEDL(char*)’:
./singleCDL.h:360: warning: deprecated conversion from string constant to ‘char*’
./singleCDL.h: In function ‘void checks::LogSparksUsage()’:
./singleCDL.h:400: warning: deprecated conversion from string constant to ‘char*’
./CBSD_EDL_to_CDL.C: At global scope:
./CBSD_EDL_to_CDL.C:134: warning: deprecated conversion from string constant to ‘char*’
Attempted Solutions
There are two methods people have discussed to correct this (in as much as I could find), and one I tried through additional research:
- Change the font in the window - but no font selection changed the incorrect display of the single quote character
- Change Encoding.GetEncoding() - but had no idea how to enact this change
- Adding
chcp
in mybuild.bat
file, by making it the first line but no change in Output Window display
Possible - and as yet Untested - Solutions
- Upgrade to VStudio 2013 or 2015. Problems with this? Possible time to re-implement build solution (if even necessary). Also... I'd rather not have to change software.
- Pipe remote host compilation output to additional build step, on local or remote host, using python, to attempt more controlled character encoding translations. Problems? Lengthy solution that adds more machinery to the build process.
Background
- I'm writing code in my preferred IDE, Visual Studio (current version 2010).
- The code is being compiled on a remote linux host:
RedHat Enterprise Linux Workstation Release 6.2 (Santiago)
. - I've set up a custom build tool for my project such that it copies the files to the remote host and then compiles on that computer.
- I'm using command line
ssh
to perform the file copies and remote compilation. - VS2010 performs these actions through a simple
build.bat
file; this is the custom build tool. - In order to get
ssh
to run as command line, I've addedcygwin/bin
to the 'Executable Directories' environment variable list in the project property page, in VS2010.