@@ -1476,13 +1476,13 @@ encoder_listencode_obj(PyEncoderObject *s, PyUnicodeWriter *writer,
14761476    int  rv ;
14771477
14781478    if  (obj  ==  Py_None ) {
1479-       return  PyUnicodeWriter_WriteUTF8 (writer , "null" , 4 );
1479+       return  PyUnicodeWriter_WriteASCII (writer , "null" , 4 );
14801480    }
14811481    else  if  (obj  ==  Py_True ) {
1482-       return  PyUnicodeWriter_WriteUTF8 (writer , "true" , 4 );
1482+       return  PyUnicodeWriter_WriteASCII (writer , "true" , 4 );
14831483    }
14841484    else  if  (obj  ==  Py_False ) {
1485-       return  PyUnicodeWriter_WriteUTF8 (writer , "false" , 5 );
1485+       return  PyUnicodeWriter_WriteASCII (writer , "false" , 5 );
14861486    }
14871487    else  if  (PyUnicode_Check (obj )) {
14881488        PyObject  * encoded  =  encoder_encode_string (s , obj );
@@ -1649,7 +1649,7 @@ encoder_listencode_dict(PyEncoderObject *s, PyUnicodeWriter *writer,
16491649
16501650    if  (PyDict_GET_SIZE (dct ) ==  0 ) {
16511651        /* Fast path */ 
1652-         return  PyUnicodeWriter_WriteUTF8 (writer , "{}" , 2 );
1652+         return  PyUnicodeWriter_WriteASCII (writer , "{}" , 2 );
16531653    }
16541654
16551655    if  (s -> markers  !=  Py_None ) {
@@ -1753,7 +1753,7 @@ encoder_listencode_list(PyEncoderObject *s, PyUnicodeWriter *writer,
17531753        return  -1 ;
17541754    if  (PySequence_Fast_GET_SIZE (s_fast ) ==  0 ) {
17551755        Py_DECREF (s_fast );
1756-         return  PyUnicodeWriter_WriteUTF8 (writer , "[]" , 2 );
1756+         return  PyUnicodeWriter_WriteASCII (writer , "[]" , 2 );
17571757    }
17581758
17591759    if  (s -> markers  !=  Py_None ) {
0 commit comments