1
Fork 0
mirror of https://github.com/Steffo99/unimore-bda-6.git synced 2024-11-22 07:54:19 +00:00

Convert unichr calls to chr

This commit is contained in:
Steffo 2023-02-02 04:18:24 +01:00
parent 29c3d05b6c
commit ce959f18be
Signed by: steffo
GPG key ID: 2A24051445686895

View file

@ -172,7 +172,7 @@ class Tokenizer:
entnum = ent[2:-1]
try:
entnum = int(entnum)
s = s.replace(ent, unichr(entnum))
s = s.replace(ent, chr(entnum))
except:
pass
# Now the alpha versions:
@ -181,7 +181,7 @@ class Tokenizer:
for ent in ents:
entname = ent[1:-1]
try:
s = s.replace(ent, unichr(html.entities.name2codepoint[entname]))
s = s.replace(ent, chr(html.entities.name2codepoint[entname]))
except:
pass
s = s.replace(amp, " and ")