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?
Alright, I figured it out myself. For the curious, here is the answer:
Done.
I also encountered these errors in my environments. I think there's any easier way to change the default code pages.
In windows 10, you could go to "Settings" -> "Region" -> "Administrative" tab -> "Language for non-Unicode programs". Then you could choose the region you want.
In this way, all the codes read from Visual Studio would use the code page whatever you want.
For example, the default setting for me is Chinese (Traditional, Taiwan). The code page is 950. But the codes are using windows-1252, therefore, I change the region to English (United States).
That's it.
Hope the solution could help you.
Thanks.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With