title: Visual Studio encoding problems
body: <p>I have problems with files encoding in Visual Studio 2008. While compiling I'm getting such errors:</p>
  
  <p><img src="https://i.stack.imgur.com/KhDWd.jpg" alt="alt text"></p>
  
  <p>When I'm trying to open file where particular error occures, encoding window appears:</p>
  
  <p><img src="https://i.stack.imgur.com/7NSY7.jpg" alt="alt text"></p>
  
  <p>By defualt auto-detect is set. When I change encoding option to UTF-8, everything works. If I open each problematic file in my project using UTF-8 encoding, project starts to compile. The problem is I have too many files and there is ridiculous to open each file and set encoding to UTF-8. Is there any way to make this in a quick way ?</p>
  
  <p>My VS settings are:</p>
  
  <p><img src="https://i.stack.imgur.com/sR2qc.jpg" alt="alt text"></p>
  
  <p>I'm using Windows Server 2008 R2.</p>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>For Hans Passant and Noah Richards. Thanks for interaction. I recently changed my operating system so everything is fresh. I've also downloaded fresh solution from source control. </p>
  
  <p>In OS regional settings I've changed system locale to Polish(Poland):</p>
  
  <p><img src="https://i.stack.imgur.com/Xh7ZB.jpg" alt="alt text"></p>
  
  <p>In VS I've changed international settings to the same as windows:</p>
  
  <p><img src="https://i.stack.imgur.com/xEgno.jpg" alt="alt text"></p>
  
  <p>The problem is still not solved.</p>
  
  <p>When I open some .cs files using auto-detection for encoding, and then check <strong>Files -> Advanced Save Options...</strong>, some of this .cs files have codepage 1250:</p>
  
  <p><img src="https://i.stack.imgur.com/UUA9F.jpg" alt="alt text"></p>
  
  <p>but internally looks following:</p>
  
  <p><img src="https://i.stack.imgur.com/oHV4n.jpg" alt="alt text"></p>
  
  <p>It is wired, because when I check properties of such particular files in source control, they seems to have UTF-8 encoding set:</p>
  
  <p><img src="https://i.stack.imgur.com/7YjpN.jpg" alt="alt text"></p>
  
  <p>I don't understand this mismatch.</p>
  
  <p>All other files have UTF-8 encoding:</p>
  
  <p><img src="https://i.stack.imgur.com/mwVms.jpg" alt="alt text"></p>
  
  <p>and opens correctly. I have basically no idea what is going wrong because as far as I know my friend has the same options set as me, and the same project compiles for him correctly. But so far he happily hasn't encountered encoding issues.</p>