Merge pull request #685 from mvastola/master

Fix "UnicodeEncodeError" in k4mobidedrm.py with titles containing UTF-8 chars
This commit is contained in:
Apprentice Harper 2019-01-19 15:16:07 +00:00 committed by GitHub
commit 588d06e846
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -269,7 +269,7 @@ def decryptBook(infile, outdir, kDatabaseFiles, androidFiles, serials, pids):
re.match('^{0-9A-F-}{36}$', orig_fn_root)
): # Kindle for PC / Mac / Android / Fire / iOS
clean_title = cleanup_name(book.getBookTitle())
outfilename = '{}_{}'.format(orig_fn_root, clean_title)
outfilename = u'{}_{}'.format(orig_fn_root, clean_title)
else: # E Ink Kindle, which already uses a reasonable name
outfilename = orig_fn_root