[Python-3000] Bytes and unicode conversion in C extensions
mike.klaas at gmail.com
Tue Jul 29 22:29:19 CEST 2008
On 29-Jul-08, at 7:32 AM, Jesus Cea wrote:
> Working on the 3.0 version of bsddb, I have the following issue.
> Until 3.0, keys and values were strings. For bsddb, they are opaque,
> stored unchanged.
> In 3.0 the string type is replaced by unicode. A new "byte" type is
> added. So, code like "db.put('key','value')" needs to be changed to
> "db.put(bytes('key', 'utf-8'), bytes('value', 'utf-8'))", or something
You may find this thread to be relevant:
More information about the Python-3000