THRIFT-3503 Enable py:utf8string by default
This closes #779
diff --git a/lib/py/src/protocol/fastbinary.c b/lib/py/src/protocol/fastbinary.c
index eaecb8c..337201b 100644
--- a/lib/py/src/protocol/fastbinary.c
+++ b/lib/py/src/protocol/fastbinary.c
@@ -228,7 +228,7 @@
static bool
is_utf8(PyObject* typeargs) {
- return PyString_Check(typeargs) && !strcmp(PyString_AS_STRING(typeargs), "UTF8");
+ return PyString_Check(typeargs) && !strncmp(PyString_AS_STRING(typeargs), "UTF8", 4);
}
/* --- FUNCTIONS TO PARSE STRUCT SPECIFICATOINS --- */