[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to load unicode-encoded data in the UDD? (was: Re: Gathering package upstream meta-data in the UDD).



Le Wed, Aug 18, 2010 at 09:42:11AM +0200, Jakub Wilk a écrit :
>
> Just a wild guess: values coming from yaml are Unicode strings, whereas  
> database backend expects byte strings. If this is the case,
>
> cur.execute(query, (package, key, value.encode('utf-8')))

Thank you very much, that exactly solved the problem.
(I just had to convert numbers to strings with ‘unicode(value)’ before).

Have a nice day,

-- 
Charles Plessy
Debian Med packaging team,
http://www.debian.org/devel/debian-med
Tsurumi, Kanagawa, Japan


Reply to: