Hello,

For some reason, the following script turns UTF8 data in SQLite into Latin1:

==============
import sqlite3

"""
OK!
sqlite3 mydb.sqlite
.output check.from.sqlite.txt
select * from table1;
"""

testoutput = open("check.from.Python.txt", "w")

con = sqlite3.connect('mydb.sqlite')
con.row_factory = sqlite3.Row
cur = con.cursor()

cur.execute("SELECT * FROM table1");
results = cur.fetchall()
for row in results:
        testoutput.write(row["name"])
==============

Did I miss a switch somewhere to tell Python to leave encoding alone?

Thank you.



--
Sent from: http://sqlite.1065341.n5.nabble.com/
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to