From 01d276a9dc69bd83c7ab803501998843a1160065 Mon Sep 17 00:00:00 2001 From: Alexey Golub Date: Sat, 9 Feb 2019 21:20:20 +0200 Subject: [PATCH] Use UTF8 encoding in UpdateVersion.ps1 --- UpdateVersion.ps1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/UpdateVersion.ps1 b/UpdateVersion.ps1 index 1eb7f76d..9e86ffbd 100644 --- a/UpdateVersion.ps1 +++ b/UpdateVersion.ps1 @@ -3,9 +3,9 @@ param([string] $newVersion) function Replace-TextInFile { param([string] $filePath, [string] $pattern, [string] $replacement) - $content = [System.IO.File]::ReadAllText($filePath) - $content = [System.Text.RegularExpressions.Regex]::Replace($content, $pattern, $replacement) - [System.IO.File]::WriteAllText($filePath, $content) + $content = [IO.File]::ReadAllText($filePath) + $content = [Text.RegularExpressions.Regex]::Replace($content, $pattern, $replacement) + [IO.File]::WriteAllText($filePath, $content, [Text.Encoding]::UTF8) } Replace-TextInFile "$PSScriptRoot\DiscordChatExporter.Core\DiscordChatExporter.Core.csproj" '(?<=)(.*?)(?=)' $newVersion