Issue #27895:  Spelling fixes (Contributed by Ville Skyttä).
diff --git a/Objects/stringlib/codecs.h b/Objects/stringlib/codecs.h
index 2846d7e..749e765 100644
--- a/Objects/stringlib/codecs.h
+++ b/Objects/stringlib/codecs.h
@@ -347,7 +347,7 @@
                 break;
 
             case _Py_ERROR_BACKSLASHREPLACE:
-                /* substract preallocated bytes */
+                /* subtract preallocated bytes */
                 writer.min_size -= max_char_size * (endpos - startpos);
                 p = backslashreplace(&writer, p,
                                      unicode, startpos, endpos);
@@ -357,7 +357,7 @@
                 break;
 
             case _Py_ERROR_XMLCHARREFREPLACE:
-                /* substract preallocated bytes */
+                /* subtract preallocated bytes */
                 writer.min_size -= max_char_size * (endpos - startpos);
                 p = xmlcharrefreplace(&writer, p,
                                       unicode, startpos, endpos);
@@ -387,7 +387,7 @@
                 if (!rep)
                     goto error;
 
-                /* substract preallocated bytes */
+                /* subtract preallocated bytes */
                 writer.min_size -= max_char_size;
 
                 if (PyBytes_Check(rep)) {