title: Visual Studio C# disable unicode or utf-8 as file encoding and use ASCII instead
body: <p>I am currently working on some LaTeX document which embeds C# files generated by Visual Studio 2008. My problem is that these files are encoded in UTF-8 with BOM. This causes LaTeX to produce output similar to the output described in this post:<br>
  <a href="https://stackoverflow.com/questions/595988/invalid-characters-in-generated-latex-sources-in-doxygen">Invalid characters in generated latex sources in Doxygen?</a></p>
  
  <p>I know that I can use a tool like Notepad++ to convert the file to ASCII or some other format without BOM. But my intention would be to:</p>
  
  <ul>
  <li><p>either cause LaTeX to use correct input encoding (until now I failed doing it with the package imports like:</p>
  
  <p>\usepackage{ucs} % unicode functionality<br>
  \usepackage[latin1]{inputenc}</p></li>
  <li><p>or cause Visual Studio to save the files without BOM or in plain ASCII</p></li>
  </ul>
  
  <p>Otherwise I might edit the file (compile it and save it in VC#) and unintentionally introduce BOM again, which would break the code listing in the document.</p>
  
  <p>Many thanks,<br>
  Ovanes</p>