我知道也有类似的问题,但答案是不同的和有点混乱。
我有这个绳子:
titulo = "Así Habló Zaratustra (Cómic)"
当我尝试将其插入到SQLite数据库时,会出现错误:
sqlite3.ProgrammingError: You must not use 8-bit bytestrings unless you use a text_factory that can interpret 8-bit bytestrings (like text_factory = str). It is highly recommended that you instead just switch your application to Unicode strings.
我试过几次都没有成功。请帮忙。
做它告诉你做的事情,并使用
unicode
值代替:在插入时,
sqlite3
库将正确编码,在选择时再次解码。相关问题 更多 >
编程相关推荐