ConvertOneNote2MarkDown icon indicating copy to clipboard operation
ConvertOneNote2MarkDown copied to clipboard

If utf-8 string in some markdown file has broken, need to specify UTF8

Open ozdang opened this issue 1 year ago • 0 comments

If utf-8 string in some markdown file has broken, need to specify UTF8 encoding to Get-Content and Set-Content pairs

like from

((Get-Content -LiteralPath "$($fullexportpathwithoutextension).md" -Raw).Replace("$($pageinsertedfile.InsertedFile.preferredName)", "[$($destfilename)](./$($destfilename))")) | Set-Content -LiteralPath "$($fullexportpathwithoutextension).md"

to

((Get-Content -LiteralPath "$($fullexportpathwithoutextension).md" -Raw -Encoding UTF8).Replace("$($pageinsertedfile.InsertedFile.preferredName)", "[$($destfilename)](./$($destfilename))")) | Set-Content -LiteralPath "$($fullexportpathwithoutextension).md" -Encoding UTF8

.

Repeate all Get-Content and Set-Content pair (current version has 4 pairs)

ozdang avatar Jun 24 '24 08:06 ozdang