I'm writing this for Google; I've found several posts on it but none appeared comprehensive.
When writing Windows applications in C or C++, it really is wise to enable Unicode, which is designed to support worldwide character sets, as Windows is Unicode under the hood. Almost all my C/C++ projects have been fully Unicode-compatible for years.
But one of my projects involves integrating into a third-party system that has no provisions for anything but standard ASCII, so it's necessary to turn this off. It's not at all intuitive (to me, at least).
These instructions are for Visual Studio 2012, but a quick check of VS 2010 shows that it works the same way (VS 2008 likely as well).
From the top menu bar, nav to View » Other Windows » Property Manager, and it brings up the property manager pages:
Rather than group all your settings (compiler flags, library directories, preprocessor defines, etc.) into one big basket, they're broken up into collections that can be operated on (and included/excluded) in groups.
I've used this mechanism in larger solutions that allow me to define common settings that I import into every sub-project - otherwise it's too difficult to insure that every setting is set properly in every project. It's very handy, albeit confusing at times.
Here, we see "Unicode Support" as one of the property collections, and double-clicking on it shows the settings. The only thing that this collection brings to the table (as far as I can tell) are the UNICODE and _UNICODE defines, the very things we wish to rid ourselves of:
As this is provided by the system, we can neither edit them nor remove them directly, but there's an easy way to remove them indirectly.
Double-click on the "Debug | Win32" configuration, which brings up the "Debug Property Pages", and navigate to Common Properties » General.
Note the "Character Set" setting: drop-down this setting and change "Use Unicode Character Set" to "Use Multi-Byte Character Set", and save your changes. After closing, we see that the set of property collections no longer includes Unicode:
Important: this step must be repeated for the Release | Win32 configuration, as well as any configurations for all other related projects.
In my version of Visual Studio 2012, running under Windows 7, 64 bit, I find View -> Other Windows -> Property Manager Console, which opens a text based command type of window names Package Manager Console. The prompt PM> and it expects the user to type in a command. This is nothing like the example above.
Brian: you clicked "Package Manager Console" rather than "Property Manager" -- Steve
Posted by: Bryan Kelly | November 11, 2013 at 04:50 PM