mirror of
https://github.com/kovidgoyal/calibre.git
synced 2026-05-21 06:16:33 -04:00
Ensure pdb header title is encoded correctly.
This commit is contained in:
@@ -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].encode('utf-8')
|
||||
self.title = re.sub('[^-A-Za-z0-9]+', '_', title).ljust(32, '\x00')[:32].encode('ascii', 'replace')
|
||||
|
||||
def build_header(self, section_lengths, out_stream):
|
||||
'''
|
||||
|
||||
Reference in New Issue
Block a user