3

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:

  1. Change the font in the window - but no font selection changed the incorrect display of the single quote character
  2. Change Encoding.GetEncoding() - but had no idea how to enact this change
  3. Adding chcp in my build.bat file, by making it the first line but no change in Output Window display

Possible - and as yet Untested - Solutions

  1. 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.
  2. 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 added cygwin/bin to the 'Executable Directories' environment variable list in the project property page, in VS2010.
Community
  • 1
  • 1
Andrew
  • 1,423
  • 1
  • 17
  • 26
  • You might be out of luck, when I tried `System.Diagnostics.Debug.WriteLine("‘status checks::IsFileEDL(char*)’"); ` in VS 2013, it worked so Microsoft must have made changes to the IDE to interpret the characters correctly. Maybe you could just avoid that character. Instead of ‘ use ' – Steve Wellens Nov 11 '15 at 21:41
  • So how did you run the System.Diagnostics.Debug.Writeline(....)? – Andrew Nov 11 '15 at 21:50
  • Also, the character is a direct result of the compiler message on the remote host computer. I'd have to write a separate program just to translate the text. I'd prefer to avoid this. – Andrew Nov 11 '15 at 22:00
  • I ran System.Diagnostics.Debug.Writeline on a button click. Since you said you were formatting the message, I assumed _you_ were putting in the single quotes. – Steve Wellens Nov 12 '15 at 04:56
  • I am not putting in the single quotes. They are the result of the remote host compilation step. – Andrew Nov 16 '15 at 22:16

0 Answers0