Skip to content

Commit e322284

Browse files
committed
Use SQLITE_UTF8_ZT since that is also PyUnicode underlying represntation
1 parent 7229345 commit e322284

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/connection.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2841,7 +2841,7 @@ set_context_result(sqlite3_context *context, PyObject *obj)
28412841
strdata = PyUnicode_AsUTF8AndSize(obj, &strbytes);
28422842
if (strdata)
28432843
{
2844-
sqlite3_result_text64(context, strdata, strbytes, SQLITE_TRANSIENT, SQLITE_UTF8);
2844+
sqlite3_result_text64(context, strdata, strbytes, SQLITE_TRANSIENT, SQLITE_UTF8_ZT);
28452845
return 1;
28462846
}
28472847
sqlite3_result_error(context, "Unicode conversions failed", -1);

src/cursor.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -666,7 +666,7 @@ APSWCursor_dobinding(APSWCursor *self, int arg, PyObject *obj)
666666
strdata = PyUnicode_AsUTF8AndSize(obj, &strbytes);
667667
if (strdata)
668668
{
669-
res = sqlite3_bind_text64(self->statement->vdbestatement, arg, strdata, strbytes, SQLITE_TRANSIENT, SQLITE_UTF8);
669+
res = sqlite3_bind_text64(self->statement->vdbestatement, arg, strdata, strbytes, SQLITE_TRANSIENT, SQLITE_UTF8_ZT);
670670
}
671671
else
672672
{

0 commit comments

Comments
 (0)