Can I get SQLite for a string instead of unicode for TEXT in Python?

AFAIK SQLite returns unicode objects for TEXTin Python. Is it possible to get SQLite to return string objects?

+3
source share
3 answers

While further testing the Python SQLite API, I found this a bit:

http://docs.python.org/library/sqlite3.html#sqlite3.Connection.text_factory

Case is closed.

+8
source

TEXTDesigned to store text. Use BLOBif you want to save bytes.

+4
source

Python 3.2+. unicode ( Python 2.7)

0

Source: https://habr.com/ru/post/1763755/


All Articles