diff options
author | pxinwr <peixing.xin@windriver.com> | 2019-03-04 17:02:06 +0800 |
---|---|---|
committer | Victor Stinner <vstinner@redhat.com> | 2019-03-04 10:02:06 +0100 |
commit | f4b0a1c0da80318e0a4f4c70d2722f01ce3512dd (patch) | |
tree | f10e50c695bdeea8a9aeb06b59ace1d5540af53f /Python/coreconfig.c | |
parent | 8bc401a55ce5dfcdd225c20786ba8e221a0bf29b (diff) | |
download | cpython-git-f4b0a1c0da80318e0a4f4c70d2722f01ce3512dd.tar.gz |
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 'Python/coreconfig.c')
-rw-r--r-- | Python/coreconfig.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/coreconfig.c b/Python/coreconfig.c index e1bf8b523c..c3eccb3b19 100644 --- a/Python/coreconfig.c +++ b/Python/coreconfig.c @@ -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); |