Ensure ascii with pdb header title.

This commit is contained in:
John Schember 2009-06-12 18:43:42 -04:00
parent f7b9bc3b63
commit 52e9ee0ce3

View File

@ -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):
'''