How do I change the code page MS Visual Studio 2008 uses to open files?

Spin City picture Spin City · Mar 5, 2010 · Viewed 11k times · Source

I have a cpp file that uses ibm cp437 and Visual C++ keeps reading it with windows-1252. How do I make Visual C++ use the right code page for the file?

Answer

Spin City picture Spin City · Mar 5, 2010

Alright, I figured it out myself. For the curious, here is the answer:

  • Right click the file in the Solution Explorer.
  • Select "Open With..."
  • Choose "C++ Source Code Editor (with encoding)"
  • A new box appears to specify Encoding. Choose "OEM United States - Codepage 437"

Done.