@@ -91,12 +91,12 @@ _codecs_lookup_impl(PyModuleDef *module, const char *encoding)
9191/*[clinic input]
9292_codecs.encode
9393 obj: object
94- encoding: str(c_default="NULL") = sys.getdefaultencoding()
94+ encoding: str(c_default="NULL") = "utf-8"
9595 errors: str(c_default="NULL") = "strict"
9696
9797Encodes obj using the codec registered for encoding.
9898
99- encoding defaults to the default encoding. errors may be given to set a
99+ The default encoding is 'utf-8' . errors may be given to set a
100100different error handling scheme. Default is 'strict' meaning that encoding
101101errors raise a ValueError. Other possible values are 'ignore', 'replace'
102102and 'backslashreplace' as well as any other name registered with
@@ -106,7 +106,7 @@ codecs.register_error that can handle ValueErrors.
106106static PyObject *
107107_codecs_encode_impl (PyModuleDef * module , PyObject * obj , const char * encoding ,
108108 const char * errors )
109- /*[clinic end generated code: output=5c073f62249c8d7c input=2440d769df020a0e ]*/
109+ /*[clinic end generated code: output=5c073f62249c8d7c input=cd5b685040ff61f0 ]*/
110110{
111111 if (encoding == NULL )
112112 encoding = PyUnicode_GetDefaultEncoding ();
@@ -118,12 +118,12 @@ _codecs_encode_impl(PyModuleDef *module, PyObject *obj, const char *encoding,
118118/*[clinic input]
119119_codecs.decode
120120 obj: object
121- encoding: str(c_default="NULL") = sys.getdefaultencoding()
121+ encoding: str(c_default="NULL") = "utf-8"
122122 errors: str(c_default="NULL") = "strict"
123123
124124Decodes obj using the codec registered for encoding.
125125
126- encoding defaults to the default encoding . errors may be given to set a
126+ Default encoding is 'utf-8' . errors may be given to set a
127127different error handling scheme. Default is 'strict' meaning that encoding
128128errors raise a ValueError. Other possible values are 'ignore', 'replace'
129129and 'backslashreplace' as well as any other name registered with
@@ -133,7 +133,7 @@ codecs.register_error that can handle ValueErrors.
133133static PyObject *
134134_codecs_decode_impl (PyModuleDef * module , PyObject * obj , const char * encoding ,
135135 const char * errors )
136- /*[clinic end generated code: output=c81cbf6189a7f878 input=a351e5f5baad1544 ]*/
136+ /*[clinic end generated code: output=c81cbf6189a7f878 input=7702c0cc2fa1add6 ]*/
137137{
138138 if (encoding == NULL )
139139 encoding = PyUnicode_GetDefaultEncoding ();
0 commit comments