ConvertOneNote2MarkDown
ConvertOneNote2MarkDown copied to clipboard
If utf-8 string in some markdown file has broken, need to specify UTF8
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)