mirror of
https://github.com/python/cpython.git
synced 2025-08-30 21:48:47 +00:00
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.
This commit is contained in:
parent
8bc401a55c
commit
f4b0a1c0da
7 changed files with 19 additions and 14 deletions
|
@ -1280,7 +1280,7 @@ get_locale_encoding(char **locale_encoding)
|
|||
#ifdef MS_WINDOWS
|
||||
char encoding[20];
|
||||
PyOS_snprintf(encoding, sizeof(encoding), "cp%d", GetACP());
|
||||
#elif defined(__ANDROID__)
|
||||
#elif defined(__ANDROID__) || defined(__VXWORKS__)
|
||||
const char *encoding = "UTF-8";
|
||||
#else
|
||||
const char *encoding = nl_langinfo(CODESET);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue