Re: Anoying unicode / str conversion problem

2009-01-26 Thread Hans Müller
Thanks Peter, your answer did the trick. I programed a lot with awk (also a very cool scripting language). So I was focused on the concept a dictionary key has to be string (as in awk). Since it's impossible to use a list as a dictionary key I thought it's also impossible to use a tuple as a key.

Re: Anoying unicode / str conversion problem

2009-01-26 Thread Peter Otten
Hans Müller wrote: > Hi python experts, > > in the moment I'm struggling with an annoying problem in conjunction with > mysql. > > I'm fetching rows from a database, which the mysql drive returns as a list > of tuples. > > The default coding of the database is utf-8. > > Unfortunately in the d

Re: Anoying unicode / str conversion problem

2009-01-26 Thread Benjamin Kaplan
On Mon, Jan 26, 2009 at 3:21 PM, Hans Müller wrote: > Hi python experts, > > in the moment I'm struggling with an annoying problem in conjunction with > mysql. > > I'm fetching rows from a database, which the mysql drive returns as a list > of tuples. > > The default coding of the database is utf

Anoying unicode / str conversion problem

2009-01-26 Thread Hans Müller
Hi python experts, in the moment I'm struggling with an annoying problem in conjunction with mysql. I'm fetching rows from a database, which the mysql drive returns as a list of tuples. The default coding of the database is utf-8. Unfortunately in the database there are rows with different cod