@@ -412,26 +412,33 @@ used, passing :c:func:`PyUnicode_FSDecoder` as the conversion function:
412412
413413.. c :function :: PyObject* PyUnicode_DecodeFSDefaultAndSize (const char *s, Py_ssize_t size)
414414
415- Decode a null-terminated string using :c:data: `Py_FileSystemDefaultEncoding `
416- and the `` " surrogateescape" `` error handler.
415+ Decode a string using :c:data: `Py_FileSystemDefaultEncoding ` and the
416+ `` ' surrogateescape' `` error handler, or `` 'strict' `` on Windows .
417417
418418 If :c:data: `Py_FileSystemDefaultEncoding ` is not set, fall back to UTF-8.
419419
420- Use :c:func: `PyUnicode_DecodeFSDefaultAndSize ` if you know the string length.
420+ .. versionchanged :: 3.2
421+ Use ``'strict' `` error handler on Windows.
421422
422423
423424.. c :function :: PyObject* PyUnicode_DecodeFSDefault (const char *s)
424425
425- Decode a string using :c:data: `Py_FileSystemDefaultEncoding ` and
426- the ``" surrogateescape" `` error handler.
426+ Decode a null-terminated string using :c:data: `Py_FileSystemDefaultEncoding `
427+ and the ``' surrogateescape' `` error handler, or `` 'strict' `` on Windows .
427428
428429 If :c:data: `Py_FileSystemDefaultEncoding ` is not set, fall back to UTF-8.
429430
431+ Use :c:func: `PyUnicode_DecodeFSDefaultAndSize ` if you know the string length.
432+
433+ .. versionchanged :: 3.2
434+ Use ``'strict' `` error handler on Windows.
435+
430436
431437.. c :function :: PyObject* PyUnicode_EncodeFSDefault (PyObject *unicode)
432438
433439 Encode a Unicode object to :c:data: `Py_FileSystemDefaultEncoding ` with the
434- ``'surrogateescape' `` error handler, and return :class: `bytes `.
440+ ``'surrogateescape' `` error handler, or ``'strict' `` on Windows, and return
441+ :class: `bytes `.
435442
436443 If :c:data: `Py_FileSystemDefaultEncoding ` is not set, fall back to UTF-8.
437444
0 commit comments