Skip to content

Commit

Permalink
Ensure Expand-Template uses UTF-8 when replacing placeholders.
Browse files Browse the repository at this point in the history
  • Loading branch information
richardstanton authored and AArnott committed Jan 6, 2025
1 parent 656c5ff commit 5f9a344
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Expand-Template.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ function Replace-Placeholders {

$Path = Resolve-Path $Path
Write-Host "Replacing tokens in `"$Path`""
$content = Get-Content -LiteralPath $Path | Out-String
$content = Get-Content -Encoding UTF8 -LiteralPath $Path | Out-String
$Replacements.GetEnumerator() |% {
$modifiedContent = $content -replace $_.Key,$_.Value
if ($modifiedContent -eq $content) {
Expand Down

0 comments on commit 5f9a344

Please sign in to comment.