File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33con = sqlite3 .connect (":memory:" )
44cur = con .cursor ()
55
6- AUSTRIA = "\xd6 sterreich "
6+ AUSTRIA = "Österreich "
77
8- # by default, rows are returned as Unicode
8+ # by default, rows are returned as str
99cur .execute ("select ?" , (AUSTRIA ,))
1010row = cur .fetchone ()
1111assert row [0 ] == AUSTRIA
Original file line number Diff line number Diff line change @@ -513,8 +513,8 @@ Connection Objects
513513
514514 Using this attribute you can control what objects are returned for the ``TEXT ``
515515 data type. By default, this attribute is set to :class: `str ` and the
516- :mod: `sqlite3 ` module will return Unicode objects for ``TEXT ``. If you want to
517- return bytestrings instead, you can set it to :class: `bytes `.
516+ :mod: `sqlite3 ` module will return :class: ` str ` objects for ``TEXT ``.
517+ If you want to return :class: ` bytes ` instead, you can set it to :class: `bytes `.
518518
519519 You can also set it to any other callable that accepts a single bytestring
520520 parameter and returns the resulting object.
You can’t perform that action at this time.
0 commit comments