@@ -758,11 +758,13 @@ system.
758758 *errors* is ``NULL``. *str* must end with a null character but
759759 cannot contain embedded null characters.
760760
761+ Use :c:func:`PyUnicode_DecodeFSDefaultAndSize` to decode a string from
762+ :c:data:`Py_FileSystemDefaultEncoding` (the locale encoding read at
763+ Python startup).
764+
761765 .. seealso::
762766
763- Use :c:func:`PyUnicode_DecodeFSDefaultAndSize` to decode a string from
764- :c:data:`Py_FileSystemDefaultEncoding` (the locale encoding read at
765- Python startup).
767+ The :c:func:`Py_DecodeLocale` function.
766768
767769 .. versionadded:: 3.3
768770
@@ -783,11 +785,13 @@ system.
783785 *errors* is ``NULL``. Return a :class:`bytes` object. *str* cannot
784786 contain embedded null characters.
785787
788+ Use :c:func:`PyUnicode_EncodeFSDefault` to encode a string to
789+ :c:data:`Py_FileSystemDefaultEncoding` (the locale encoding read at
790+ Python startup).
791+
786792 .. seealso::
787793
788- Use :c:func:`PyUnicode_EncodeFSDefault` to encode a string to
789- :c:data:`Py_FileSystemDefaultEncoding` (the locale encoding read at
790- Python startup).
794+ The :c:func:`Py_EncodeLocale` function.
791795
792796 .. versionadded:: 3.3
793797
@@ -832,12 +836,14 @@ used, passing :c:func:`PyUnicode_FSDecoder` as the conversion function:
832836 If :c:data: `Py_FileSystemDefaultEncoding ` is not set, fall back to the
833837 locale encoding.
834838
839+ :c:data: `Py_FileSystemDefaultEncoding ` is initialized at startup from the
840+ locale encoding and cannot be modified later. If you need to decode a string
841+ from the current locale encoding, use
842+ :c:func: `PyUnicode_DecodeLocaleAndSize `.
843+
835844 .. seealso ::
836845
837- :c:data: `Py_FileSystemDefaultEncoding ` is initialized at startup from the
838- locale encoding and cannot be modified later. If you need to decode a
839- string from the current locale encoding, use
840- :c:func: `PyUnicode_DecodeLocaleAndSize `.
846+ The :c:func: `Py_DecodeLocale ` function.
841847
842848 .. versionchanged :: 3.2
843849 Use ``"strict" `` error handler on Windows.
@@ -867,12 +873,13 @@ used, passing :c:func:`PyUnicode_FSDecoder` as the conversion function:
867873 If :c:data: `Py_FileSystemDefaultEncoding ` is not set, fall back to the
868874 locale encoding.
869875
876+ :c:data: `Py_FileSystemDefaultEncoding ` is initialized at startup from the
877+ locale encoding and cannot be modified later. If you need to encode a string
878+ to the current locale encoding, use :c:func: `PyUnicode_EncodeLocale `.
879+
870880 .. seealso ::
871881
872- :c:data: `Py_FileSystemDefaultEncoding ` is initialized at startup from the
873- locale encoding and cannot be modified later. If you need to encode a
874- string to the current locale encoding, use
875- :c:func: `PyUnicode_EncodeLocale `.
882+ The :c:func: `Py_EncodeLocale ` function.
876883
877884 .. versionadded :: 3.2
878885
0 commit comments