Commit 001d4d9e authored by ankraft's avatar ankraft
Browse files

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

parent 7ee42365
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -133,7 +133,9 @@ def analyseMarkdown(filename:str) -> list[Clause]:

	print(f'[green]Analyzing "{filename}"')

	with open(filename, 'r') as file:
	# Read the file.
	# Note: We use utf-8 and replace errors to avoid problems with special or unknown characters.
	with open(filename, 'r', encoding = 'utf-8', errors = 'replace') as file:
		inLines = file.readlines()
	
	outClauses:list[Clause] = [Clause(0, '', '', [])]