Removed polyglot codepoint_to_chr

This commit is contained in:
gryf committed 2020-04-20 19:29:05 +02:00
1 parent 128705f258
commit eac0b98d6f
11 files changed
+20 -25

No files matched your search

+2 -2
View File
@@ -4,7 +4,7 @@ from datetime import datetime
from ebook_converter.constants import ispy3
from ebook_converter.utils.logging import default_log
from ebook_converter.polyglot.builtins import iteritems, codepoint_to_chr
from ebook_converter.polyglot.builtins import iteritems
from ebook_converter.polyglot.binary import as_hex_bytes
@@ -89,7 +89,7 @@ class Name(str):
raw = bytearray(raw)
sharp = ord(b'#')
buf = (
codepoint_to_chr(x).encode('ascii') if 33 < x < 126 and x != sharp else
chr(x).encode('ascii') if 33 < x < 126 and x != sharp else
'#{:x}'.format(x).encode('ascii') for x in raw)
stream.write(b'/'+b''.join(buf))