mirror of
https://github.com/gryf/ebook-converter.git
synced 2026-01-26 23:55:46 +01:00
Removed safe_chr function
This commit is contained in:
@@ -18,7 +18,6 @@ from ebook_converter.constants_old import islinux, isfrozen, \
|
||||
isbsd, __appname__, __version__, __author__, \
|
||||
config_dir
|
||||
from ebook_converter.startup import winutil, winutilerror
|
||||
from ebook_converter.utils.icu import safe_chr
|
||||
|
||||
|
||||
if False:
|
||||
@@ -231,7 +230,7 @@ def walk(dir):
|
||||
|
||||
def my_unichr(num):
|
||||
try:
|
||||
return safe_chr(num)
|
||||
return chr(num)
|
||||
except (ValueError, OverflowError):
|
||||
return '?'
|
||||
|
||||
|
||||
@@ -3,15 +3,11 @@ from collections import OrderedDict
|
||||
from operator import itemgetter
|
||||
from functools import partial
|
||||
|
||||
from ebook_converter.utils.icu import safe_chr, ord_string
|
||||
from ebook_converter.utils.icu import ord_string
|
||||
from ebook_converter.utils.fonts.sfnt.container import Sfnt
|
||||
from ebook_converter.utils.fonts.sfnt.errors import UnsupportedFont, NoGlyphs
|
||||
|
||||
|
||||
__license__ = 'GPL v3'
|
||||
__copyright__ = '2012, Kovid Goyal <kovid at kovidgoyal.net>'
|
||||
__docformat__ = 'restructuredtext en'
|
||||
|
||||
# TrueType outlines {{{
|
||||
|
||||
|
||||
@@ -253,7 +249,7 @@ def main(args):
|
||||
def conv_code(c):
|
||||
if c.upper()[:2] in ('U+', '0X'):
|
||||
c = int(c[2:], 16)
|
||||
return safe_chr(int(c))
|
||||
return chr(int(c))
|
||||
|
||||
for c in chars:
|
||||
if '-' in c:
|
||||
|
||||
Reference in New Issue
Block a user