SonarQube and Non-English encoding

Turns out that there is a semi-hidden functionality in Visual Studio Projects that can fix this:

You can specify an alternate code-page for the entire project with the CodePage tag like so:

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
  <PropertyGroup>
    <CodePage>1252</CodePage>
2 Likes