Merge lp:~hideaki-t/calibre/calibre into lp:calibre

Proposed by Hideaki Takahashi
Status: Needs review
Proposed branch: lp:~hideaki-t/calibre/calibre
Merge into: lp:calibre
Diff against target: 16 lines (+5/-1)
1 file modified
src/calibre/ebooks/mobi/writer8/main.py (+5/-1)
To merge this branch: bzr merge lp:~hideaki-t/calibre/calibre
Reviewer Review Type Date Requested Status
Kovid Goyal Disapprove
Review via email: mp+185791@code.launchpad.net

Description of the change

this brunch fixes a problem that cannot convert to KF8 format from a ebook containing quoted non UTF-8 encoding links.

To post a comment you must log in.
lp:~hideaki-t/calibre/calibre updated
15147. By Hideaki Takahashi

Merge from trunk

Revision history for this message
Kovid Goyal (kovid) wrote :

calibre development has moved to using git n github. See http://www.mobileread.com/forums/showthread.php?t=214465
I have merged your patch there.

review: Disapprove
Revision history for this message
Hideaki Takahashi (hideaki-t) wrote :

Thank you for your comment, and sorry to bother you.
I did not realized that.

Unmerged revisions

15147. By Hideaki Takahashi

Merge from trunk

15146. By Hideaki Takahashi

MOBI(KF8) output: avoid UnicodeDecodeError for not utf-8 encoded links.
see bug #1181049 and http://bazaar.launchpad.net/~kovid/calibre/trunk/revision/15030

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/calibre/ebooks/mobi/writer8/main.py'
2--- src/calibre/ebooks/mobi/writer8/main.py 2013-02-03 11:33:07 +0000
3+++ src/calibre/ebooks/mobi/writer8/main.py 2013-09-16 11:54:25 +0000
4@@ -227,7 +227,11 @@
5 count += 1
6 ref = item.abshref(a.get('href'))
7 href, _, frag = ref.partition('#')
8- href = urlnormalize(href)
9+ try:
10+ href = urlnormalize(href)
11+ except ValueError:
12+ # href has non utf-8 quoting
13+ pass
14 if href in hrefs:
15 placeholder = 'kindle:pos:fid:0000:off:%s'%to_href(count)
16 self.link_map[placeholder] = (href, frag)

Subscribers

People subscribed via source and target branches