View Single Post
Old 12-12-2010, 12:33 PM   #94
kiwidude
Calibre Plugins Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,654
Karma: 2162064
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
Quote:
Originally Posted by kovidgoyal View Post
title = u"De l'inconv\xe9nient d'\xeatre n\xe9"
Thanks, but now I'm more confused Without changing my string contents I got the above code to work by dropping the u prefix (since as you point out it is not unicode in it's current form) then dropping the ".encode("utf-8")" from the call to quote_plus. "Works" but not useful in terms of Calibre code.

The question I think becomes how do I get the title as it is stored in Calibre into the right encoding combination. In other words, what do I need to "fix" the right result when using something like this:
Code:
title = self.db.title(row)
converted = quote_plus(title.encode("utf-8"))
If I use that code, I end up with the same incorrect result as my test. Head... hurts...
kiwidude is offline