Wednesday, June 17, 2015

Open files with different encoding (like Shift-JIS) in Visual C++

Hey,

If you happened to be in Japan and need to go through comments which are written in Japanese for some of your Visual C++ projects, then you may also have encountered that the comments are not displayed properly.

The reason is that the files are opened with different encoding; not in Shift-JIS.

To resolve this issue,
- in the "Solution Explorer", right click on some file and choose "Open with"
- in "Choose the program you want to use to open this file", select "C++ Source Code Editor (with encoding)" at set it as default.
- in next popup, choose "Japanese (Shift-JIS) - Codepage 932"and press OK

If the comments are still not visible, you may want to choose a different encoding scheme until you get it right.

PS
I am using Visual Studio 2013 Professional Edition

Cheers!