mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Ensure ascii with pdb header title.
This commit is contained in:
parent
f7b9bc3b63
commit
52e9ee0ce3
@ -66,7 +66,7 @@ class PdbHeaderBuilder(object):
|
||||
|
||||
def __init__(self, identity, title):
|
||||
self.identity = identity.ljust(3, '\x00')[:8]
|
||||
self.title = re.sub('[^-A-Za-z0-9]+', '_', title).ljust(32, '\x00')[:32]
|
||||
self.title = re.sub('[^-A-Za-z0-9]+', '_', title).ljust(32, '\x00')[:32].encode('utf-8')
|
||||
|
||||
def build_header(self, section_lengths, out_stream):
|
||||
'''
|
||||
|
Loading…
x
Reference in New Issue
Block a user