View Single Post
Old 12-12-2010, 11:39 AM   #92
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,731
Karma: 2197770
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
Ok, not having quite the desired result with this. Here is my test python code:
Code:
#!/usr/bin/env python
# -*- coding: latin-1 -*-
from urllib import quote_plus
title = u"De l'inconvénient d'être né"
print quote_plus(title.encode('utf-8'))
What I would "like" to get (for Amazon to work) as the output is this:
De+l%27inconv%E9nient+d%27%EAtre%20n%E9

But instead what I get is this:
De+l%27inconv%C3%A9nient+d%27%C3%AAtre+n%C3%A9

You can see that é is being turned into %C3%A9 instead of %E9.

Clearly some kind of encoding mismatch going on but this is way out of my comfort zone of knowledge. Any suggestions?
kiwidude is offline