Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > querying unicode data (sqlite) with python

Reply
Thread Tools

querying unicode data (sqlite) with python

 
 
Tzury
Guest
Posts: n/a
 
      03-01-2007

Given an sqlite db that stores the strings data such as names, etc.
encoded in Unicode.
How do I write a sql query statement with 'LIKE' or '=' operators and
insert the Unicoded name.

for example:

in table MY_TABLE, in column COL01 there is a value "¿Habla español?"
within python I represent this value as u'\u00bfHabla espa\u00f1ol?'

if I wish to produce a query that will fetch this row something like
"SELECT * FROM MY_TABLE WHERE COL01="¿Habla español?" and I want it to
be done dynamically according to data I receive from a tcp socket.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Python unicode utf-8 characters and MySQL unicode utf-8 characters Grzegorz ¦liwiñski Python 2 01-19-2011 07:31 AM
best practice of querying amout of tree organized data senges Java 0 03-24-2007 02:03 AM
passing data between pages and querying a database in asp.net roo ASP .Net 2 10-20-2006 10:35 AM
library for querying virtual polygon over raster spatial data paul C++ 1 10-01-2005 08:44 PM
querying data from a dataset? MDB ASP .Net 3 05-17-2004 09:42 PM



Advertisments