mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Ensure pdb header title is encoded correctly.
This commit is contained in:
parent
52e9ee0ce3
commit
f8dacaa28d
@ -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):
|
||||
'''
|
||||
|
Loading…
x
Reference in New Issue
Block a user