diff options
author | pxinwr <peixing.xin@windriver.com> | 2019-03-04 09:02:06 (GMT) |
---|---|---|
committer | Victor Stinner <vstinner@redhat.com> | 2019-03-04 09:02:06 (GMT) |
commit | f4b0a1c0da80318e0a4f4c70d2722f01ce3512dd (patch) | |
tree | f10e50c695bdeea8a9aeb06b59ace1d5540af53f /Doc/c-api | |
parent | 8bc401a55ce5dfcdd225c20786ba8e221a0bf29b (diff) | |
download | cpython-f4b0a1c0da80318e0a4f4c70d2722f01ce3512dd.zip cpython-f4b0a1c0da80318e0a4f4c70d2722f01ce3512dd.tar.gz cpython-f4b0a1c0da80318e0a4f4c70d2722f01ce3512dd.tar.bz2 |
bpo-31904: Add encoding support for VxWorks RTOS (GH-12051)
Use UTF-8 as the system encoding on VxWorks.
The main reason are:
1. The locale is frequently misconfigured.
2. Missing some functions to deal with locale in VxWorks C library.
Diffstat (limited to 'Doc/c-api')
-rw-r--r-- | Doc/c-api/sys.rst | 4 | ||||
-rw-r--r-- | Doc/c-api/unicode.rst | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/Doc/c-api/sys.rst b/Doc/c-api/sys.rst index 0eee35a..c8ea783 100644 --- a/Doc/c-api/sys.rst +++ b/Doc/c-api/sys.rst @@ -108,7 +108,7 @@ Operating System Utilities Encoding, highest priority to lowest priority: - * ``UTF-8`` on macOS and Android; + * ``UTF-8`` on macOS, Android, and VxWorks; * ``UTF-8`` on Windows if :c:data:`Py_LegacyWindowsFSEncodingFlag` is zero; * ``UTF-8`` if the Python UTF-8 mode is enabled; * ``ASCII`` if the ``LC_CTYPE`` locale is ``"C"``, @@ -154,7 +154,7 @@ Operating System Utilities Encoding, highest priority to lowest priority: - * ``UTF-8`` on macOS and Android; + * ``UTF-8`` on macOS, Android, and VxWorks; * ``UTF-8`` on Windows if :c:data:`Py_LegacyWindowsFSEncodingFlag` is zero; * ``UTF-8`` if the Python UTF-8 mode is enabled; * ``ASCII`` if the ``LC_CTYPE`` locale is ``"C"``, diff --git a/Doc/c-api/unicode.rst b/Doc/c-api/unicode.rst index 39c067d..97c5ebc 100644 --- a/Doc/c-api/unicode.rst +++ b/Doc/c-api/unicode.rst @@ -760,8 +760,8 @@ system. Py_ssize_t len, \ const char *errors) - Decode a string from UTF-8 on Android, or from the current locale encoding - on other platforms. The supported + Decode a string from UTF-8 on Android and VxWorks, or from the current + locale encoding on other platforms. The supported error handlers are ``"strict"`` and ``"surrogateescape"`` (:pep:`383`). The decoder uses ``"strict"`` error handler if *errors* is ``NULL``. *str* must end with a null character but @@ -796,8 +796,8 @@ system. .. c:function:: PyObject* PyUnicode_EncodeLocale(PyObject *unicode, const char *errors) - Encode a Unicode object to UTF-8 on Android, or to the current locale - encoding on other platforms. The + Encode a Unicode object to UTF-8 on Android and VxWorks, or to the current + locale encoding on other platforms. The supported error handlers are ``"strict"`` and ``"surrogateescape"`` (:pep:`383`). The encoder uses ``"strict"`` error handler if *errors* is ``NULL``. Return a :class:`bytes` object. *unicode* cannot |