What version of Python and what Operating System, and what is the locale 
applicable to the process instance?

-- 
The fact that there's a Highway to Hell but only a Stairway to Heaven says a 
lot about anticipated traffic volume.

>-----Original Message-----
>From: sqlite-users <sqlite-users-boun...@mailinglists.sqlite.org> On
>Behalf Of Winfried
>Sent: Monday, 11 November, 2019 17:42
>To: sqlite-users@mailinglists.sqlite.org
>Subject: [sqlite] Why does Python turn UTF8 data in SQLite into Latin1?
>
>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



_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to