forked from expo/troggle
ISO-8859-1 fallback 1
This commit is contained in:
parent
362aedc2ac
commit
cafde67c02
@ -128,6 +128,11 @@ def expowebpage(request, expowebpath, path):
|
|||||||
try:
|
try:
|
||||||
with open(os.path.normpath(expowebpath / path), "r") as o:
|
with open(os.path.normpath(expowebpath / path), "r") as o:
|
||||||
html = o.read()
|
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:
|
except:
|
||||||
try:
|
try:
|
||||||
with open(os.path.normpath(expowebpath / path), "rb") as o:
|
with open(os.path.normpath(expowebpath / path), "rb") as o:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user