locked
VC 2005 preprocessor output is always in ANSI RRS feed

  • Question

  • I have noticed followings with VS 2005 C++ preprocessor (CL /E /EP /P) behavior.  I think previous versions of CL worked differently, and in fact this is a blocker for us to user VS 2005 for our standrd build tool, since our build scripts are written so that they work well with the old behavior.

    i) CL can recognize that the input source file is in UTF-8 encoding only when you have the UTF-8 BOM at the beginning of the file.  Without BOM, it believes the input file is in ANSI even if the file is actually in UTF-8.

    ii) CL /E /EP /P output data seems to be always in ANSI, even if the input source file is in UTF-8 encoding.  I can see "?" characters if the source file contain character that cannot be expressed in the output ANSI file codepage.

    I just wonder you have any plan to add someting like /codepage:<n> option to CL command line (as you do for C# or J#) so that I can specify the input source codepage?  Or maybe /source_codepage:xx and /traget_codepage:xxx for both source file encoding and output file encoding?

    Wednesday, September 27, 2006 4:05 AM

Answers