mirror of
https://github.com/python/cpython.git
synced 2025-08-03 08:34:29 +00:00
parent
f0f9679d5c
commit
bc35bebb45
10 changed files with 24 additions and 50 deletions
|
@ -30,14 +30,3 @@ cur.execute("select ?", ("this is latin1 and would normally create errors" +
|
|||
"\xe4\xf6\xfc".encode("latin1"),))
|
||||
row = cur.fetchone()
|
||||
assert type(row[0]) == str
|
||||
|
||||
# sqlite3 offers a built-in optimized text_factory that will return bytestring
|
||||
# objects, if the data is in ASCII only, and otherwise return unicode objects
|
||||
con.text_factory = sqlite3.OptimizedUnicode
|
||||
cur.execute("select ?", (AUSTRIA,))
|
||||
row = cur.fetchone()
|
||||
assert type(row[0]) == str
|
||||
|
||||
cur.execute("select ?", ("Germany",))
|
||||
row = cur.fetchone()
|
||||
assert type(row[0]) == str
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue