title: Using gh api in powershell to get a file with a UTF-8 bom adds a corrupted version of the BOM to the begining of the file
body: <p>If I execute the following commands from Powershell core 7.2.6 on windows 11 to grab an XML file with a UTF-8 BOM:</p>
  <pre><code>gh api -H &quot;Accept: application/vnd.github.raw+text&quot; repos/zippy1981/CodeFirstBetter/contents/Zippysoft.CodeFirst.AD.Importer/Zippysoft_CodeFirst_AD_Importer.csproj | Out-File Zippysoft_CodeFirst_AD_Importer.csproj
  </code></pre>
  <p>I get a file Visual Studio Code thinks has no BOM, but does have 4 characters that seem to be a corrupt version of the BOM</p>
  <p><a href="https://i.stack.imgur.com/l9p0x.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/l9p0x.png" alt="enter image description here" /></a></p>
  <p>dotnet cannot parse the file until I delete them. Changing the end of the pipeline to <code>Out-File Zippysoft_CodeFirst_AD_Importer.csproj -Encoding utf8BOM</code> does not fix the problem but oes prepend an ACTUAL BOM to it. How do I get rid of those characters?</p>