mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-07-28 18:24:38 -05:00
Changes the error mode to replace instead of ignore, to better highlight where a problem happened
This commit is contained in:

committed by
Trenton H

parent
6722b6e31c
commit
2f12206911
@@ -329,7 +329,7 @@ class DocumentParser(LoggingMixin):
|
||||
text = filepath.read_text(encoding="utf-8")
|
||||
except UnicodeDecodeError as e:
|
||||
self.log("warning", f"Unicode error during text reading, continuing: {e}")
|
||||
text = filepath.read_bytes().decode("utf-8", errors="ignore")
|
||||
text = filepath.read_bytes().decode("utf-8", errors="replace")
|
||||
return text
|
||||
|
||||
def extract_metadata(self, document_path, mime_type):
|
||||
|
Reference in New Issue
Block a user