2

I have 2 projects, one from China, and another from Czech. And then I'm almost forced to go crazy.

When I compile the project from China, I was told a lot of:

C4819: Some Unicode characters in this file could not be saved in the current code page

In order to work around it, I have to set my system code page to Chinese, and reboot Windows.

After all, when I compile the project from Czech, I was also told a lot of C4819. Again, I have to set the locale of the system to Euro. Of course, I have to reboot Windows again.

And I cannot change these file to Unicode because they are not my own project. And they won't receive these patches.

And I cannot ignore these warnings too because both of them turn trust-warning-as-error on.

I don't know, why Visual Studio does such a stupid thing. Does anybody know how I can live better?

PS: I use Visual Studio 2010 and 2015.

pjincz
  • 1,782
  • 1
  • 12
  • 10
  • @Ron Thank you for your reply. But it not works. This post just set the default code for the new file. But I got two exists projects. They already saved in the different code page. – pjincz Sep 30 '17 at 21:19
  • Is it possible to set branches using git for example? On your branch you change code to UTF-8 and external projects you get and drop into their own branches and then merge changes into your "good" branch and continue to work with good branch. – Artemy Vysotsky Oct 01 '17 at 05:28
  • *"I don't know, why Visual Studio does such a stupid thing."* - Visual Studio is not to blame here. It's the authors of the projects, that assume that everyone is using their locale settings. And are fine with non-ASCII characters in source code. You need to contact the authors and ask them to stop doing at least one of these. – IInspectable Oct 01 '17 at 16:06

0 Answers0