Re: sql using characters like é and ã

2005-12-13 Thread Erik Max Francis
[EMAIL PROTECTED] wrote: > Utf-8 is the same as Unicode? No, UTF-8 is one (of several) possible encodings for expressing Unicode as a stream of bytes. -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis Exercise

Re: sql using characters like é and ã

2005-12-13 Thread fumanchu
Diez B. Roggisch wrote: > "Select * from table where name like '%s%%'" % > "José".decode("latin-1").encode("utf-8") Make it easy on yourself and encode the whole statement: conn.execute(query.encode('utf8')) Robert Brewer System Architect Amor Ministries [EMAIL PROTECTED] -- http://mail.p

Re: sql using characters like é and ã

2005-12-13 Thread tjerk
I will try it with the "José".decode("latin-1").encode("utf-8") Utf-8 is the same as Unicode? Herdsman again -- http://mail.python.org/mailman/listinfo/python-list

Re: sql using characters like é and ã

2005-12-13 Thread Magnus Lycka
Diez B. Roggisch wrote: > "Select * from table where name like '%s%%'" % > "José".decode("latin-1").encode("utf-8") Ouch! Please use parameter passing instead of building full SQL statements with embedded parameter values. You're opening up for SQL injection attacks if you allow user provided inpu

Re: sql using characters like é and ã

2005-12-12 Thread Diez B. Roggisch
[EMAIL PROTECTED] schrieb: > Hello, I am switching from VB to python. > I managed to crank my files into a sqlite > dbase, converting the original names to > unicode with s=unicode(s,"latin-1"). > Everything is working fine, but when > I query the dbase with dbapi2 and want > to retrieve names this

sql using characters like é and ã

2005-12-12 Thread tjerk
Hello, I am switching from VB to python. I managed to crank my files into a sqlite dbase, converting the original names to unicode with s=unicode(s,"latin-1"). Everything is working fine, but when I query the dbase with dbapi2 and want to retrieve names this way: 'Select * from table where name lik