querying unicode data (sqlite) with python

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Tzury

    #1

    querying unicode data (sqlite) with python


    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.

Working...