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
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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