Skip to content
Snippets Groups Projects
Commit f0297b97 authored by Miguel Angel Reina Ortega's avatar Miguel Angel Reina Ortega
Browse files

Write input file in error-replace mode to ignore and replace unknown character

parent 47fcadcc
No related tags found
No related merge requests found
Pipeline #974 passed
......@@ -96,7 +96,7 @@ def processDocument(args:argparse.Namespace) -> None:
backupFile(outDocument)
tocDone = False
# Add the TOC to the document
with open(outDocument, 'w') as f:
with open(outDocument, 'w', encoding='utf-8', errors='replace') as f:
inToc = False
for line in document:
# Skip the old TOC when writing
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment