Browse Source

fix: Added missing encoding

Vaclav Elias 2 years ago
parent
commit
e17395b99f
1 changed files with 1 additions and 1 deletions
  1. 1 1
      BuildDocs.ps1

+ 1 - 1
BuildDocs.ps1

@@ -311,7 +311,7 @@ function PostProcessing-DocFxDocUrl {
         $relativeHtmlPath = $htmlFile.FullName.Replace((Resolve-Path "$($Settings.SiteDirectory)/$($SelectedLanguage.Code)").Path + '\', '').Replace('.html', '.md')
         $relativeHtmlPath = $htmlFile.FullName.Replace((Resolve-Path "$($Settings.SiteDirectory)/$($SelectedLanguage.Code)").Path + '\', '').Replace('.html', '.md')
 
 
         # Read the content of the HTML file
         # Read the content of the HTML file
-        $content = Get-Content $htmlFile
+        $content = Get-Content $htmlFile -Encoding UTF8
 
 
         # Define a regex pattern to match the meta tag with name="docfx:docurl"
         # Define a regex pattern to match the meta tag with name="docfx:docurl"
         $pattern = '(<meta name="docfx:docurl" content=".*?)(/' + $SelectedLanguage.Code + $Settings.TempDirectory+ '/)(.*?">)'
         $pattern = '(<meta name="docfx:docurl" content=".*?)(/' + $SelectedLanguage.Code + $Settings.TempDirectory+ '/)(.*?">)'