tly!
- Original Message -
From: Kent Johnson
To: Dinesh B Vadhia
Cc: tutor@python.org
Sent: Monday, April 14, 2008 3:42 AM
Subject: Re: [Tutor] encode unicode strings from pysqlite
Dinesh B Vadhia wrote:
> Here is a program that SELECT's from a pysqlite database table
Dinesh B Vadhia wrote:
> Here is a program that SELECT's from a pysqlite database table and
> encode's the returned unicode strings:
> query = "SELECT fieldB FROM testDB WHERE fieldB LIKE '%s' LIMIT '%s'"
> %(q, limit)
> for row in cur.execute(query):
Here row is a list containing a single unic
Here is a program that SELECT's from a pysqlite database table and encode's the
returned unicode strings:
import sys
import os
import sqlite3
con = sqlite3.connect("testDB.db")
cur = con.cursor()
a = u'99 Cycling Swords'
b = a.encode('utf-8')
print b
q = '%wor%'
limit = 25
query = "SELECT fiel