mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Removed uneeded utf8_text, after trunk fix.
This commit is contained in:
parent
c10c8d03ad
commit
45deedd546
@ -302,7 +302,7 @@ def encode_tbs(val, extra, flag_size=4):
|
||||
ans += encint(extra[0b0001])
|
||||
return ans
|
||||
|
||||
def utf8_text(text, empty=False):
|
||||
def utf8_text(text):
|
||||
'''
|
||||
Convert a possibly null string to utf-8 bytes, guaranteeing to return a non
|
||||
empty, normalized bytestring.
|
||||
@ -313,10 +313,7 @@ def utf8_text(text, empty=False):
|
||||
text = text.decode('utf-8', 'replace')
|
||||
text = normalize(text).encode('utf-8')
|
||||
else:
|
||||
if not empty:
|
||||
text = _('Unknown').encode('utf-8')
|
||||
else:
|
||||
text = u''.encode('utf-8') # yeah, stupid
|
||||
return text
|
||||
|
||||
def align_block(raw, multiple=4, pad=b'\0'):
|
||||
|
Loading…
x
Reference in New Issue
Block a user