Skip to content

Commit 2102314

Browse files
committed
Fix the doc/comments
1 parent bbd3b91 commit 2102314

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎Doc/c-api/sys.rst‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ Operating System Utilities
154154
155155
Decode a byte string from the :term:`filesystem encoding <filesystem
156156
encoding and error handler>` with the :ref:`surrogateescape error handler
157-
<surrogateescape>` error handler.
157+
<surrogateescape>`.
158158
159159
Undecodable bytes are decoded as characters in range U+DC80..U+DCFF. If a
160160
byte sequence can be decoded as a surrogate character, escape the bytes
@@ -207,7 +207,7 @@ Operating System Utilities
207207
On memory allocation failure, set *\*error_pos* to ``(size_t)-1`` and return
208208
``NULL``.
209209
210-
On encoding error, set *\*error_pos* to the index of the first invalid
210+
On encoding error, set *\*error_pos* to the index of the first unencodable
211211
character and return ``NULL``.
212212
213213
The :term:`filesystem encoding and error handler` are selected by

‎Python/fileutils.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1007,7 +1007,7 @@ encode_locale(const wchar_t *text, size_t *error_pos,
10071007
//
10081008
// On memory allocation failure, set *error_pos to (size_t)-1 and return NULL.
10091009
//
1010-
// On encoding error, set *error_pos to the index of the first invalid
1010+
// On encoding error, set *error_pos to the index of the first unencodable
10111011
// character and return NULL.
10121012
//
10131013
// Use the Py_DecodeLocale() function to decode the bytes string back to a wide

0 commit comments

Comments
 (0)