ISO-8859-1 fallback 1

This commit is contained in:
Philip Sargent 2022-04-27 23:25:37 +03:00
parent 362aedc2ac
commit cafde67c02

View File

@ -128,6 +128,11 @@ def expowebpage(request, expowebpath, path):
try:
with open(os.path.normpath(expowebpath / path), "r") as o:
html = o.read()
except:
try:
with open(os.path.normpath(expowebpath / path), "r", encoding='iso-8859-1') as o:
html = o.read()
html = str(o.read()).replace("<h1>","<h1>ISO-8859-1 characters here - ")
except:
try:
with open(os.path.normpath(expowebpath / path), "rb") as o: