1
0
mirror of https://github.com/gryf/ebook-converter.git synced 2026-03-15 14:13:40 +01:00

Removed polyglot codepoint_to_chr

This commit is contained in:
2020-04-20 19:29:05 +02:00
parent 128705f258
commit eac0b98d6f
11 changed files with 20 additions and 25 deletions

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))