From b639fe30f8f01e30c16b7d3af8e46f63b39cafa4 Mon Sep 17 00:00:00 2001 From: JohnMcPMS Date: Tue, 30 Jun 2020 11:20:06 -0700 Subject: [PATCH] Port and merge #462 as its fork was deleted (#2196) --- Tools/YamlCreate.ps1 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Tools/YamlCreate.ps1 b/Tools/YamlCreate.ps1 index 0b744891c..8cecca0cf 100644 --- a/Tools/YamlCreate.ps1 +++ b/Tools/YamlCreate.ps1 @@ -233,6 +233,11 @@ write-host $SilentWithProgress -ForeGroundColor White } +$FileOldEnconding = Get-Content -Raw $filename +Remove-Item -Path $filename +$Utf8NoBomEncoding = New-Object System.Text.UTF8Encoding $False +[System.IO.File]::WriteAllLines($filename, $FileOldEnconding, $Utf8NoBomEncoding) + $string = "Yaml file created: " + $filename write-output $string