ignoring encoding errors in ansicat

This commit is contained in:
Lionel Dricot 2023-09-23 10:42:45 +02:00
parent 8c752d7b44
commit f8d185eac9
2 changed files with 2 additions and 1 deletions

View File

@ -10,6 +10,7 @@ Changes since beta1
- fixes existing non-html ressources marked a to_fetch even when not needed (simple and/or confusion)
- attempt at hiding XMLparsedAsHTMLWarning from BS4 library
- chafa now used by default everywhere if version > 1.10
- ignoring encoding error in ansicat
## 2.0-beta1 - September 05th 2023
This is an an experimental release. Bug reports and feedbacks are welcome on the offpunk-devel list.

View File

@ -1247,7 +1247,7 @@ def renderer_from_file(path,url=None,theme=None):
url = path
if os.path.exists(path):
if mime.startswith("text/") or mime in _FORMAT_RENDERERS:
with open(path) as f:
with open(path,errors="ignore") as f:
content = f.read()
f.close()
else: