This is how I solved the problem (in case somebody else face it in the
future):
.......
item=dialog.GetValue()
cols="id,attr,type"
table="names1"
v="(%s, '%s', %s)" % ("null",item,3) #the whole job is done by the '
%s'
a="insert into %s (%s) values %s" % (table,cols,v)
and then...
cursor.execute (a)
ATTENTION: If you work in Python you have to encode the value to utf-8, like
this:
item=dialog.GetValue().encode('utf-8')
otherwise, if you want to print "a", you will get the following error (for
the unicode characters) :
UnicodeEncodeError: 'ascii' codec can't encode characters in position 49-56:
ordinal not in range(128)
One more time, thank you very much for your help!
Kostas
P.S. Igor you are right for the security. I am working on it...
--
View this message in context:
http://www.nabble.com/Python-Sqlite-Unicode-characters-tf3486826.html#a9749435
Sent from the SQLite mailing list archive at Nabble.com.
-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------