Skip to content

bpo-31904: set expected default encoding in test_c_locale_coercion.py for VxWorks RTOS #19448

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 9, 2020

Conversation

pxinwr
Copy link
Contributor

@pxinwr pxinwr commented Apr 9, 2020

So far VxWorks RTOS only supports "C" locale and always use utf-8 encoding for the "C" locale.

https://bugs.python.org/issue31904

Copy link
Member

@vstinner vstinner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

It's consistent with Include/pyport.h:

#if defined(__ANDROID__) || defined(__VXWORKS__)
   /* Ignore the locale encoding: force UTF-8 */
#  define _Py_FORCE_UTF8_LOCALE
#endif

I added _Py_FORCE_UTF8_LOCALE to better support platforms where the locale is ignored and we force the usage of the UTF-8 encoding.

@vstinner vstinner merged commit 5cd2803 into python:master Apr 9, 2020
@pxinwr pxinwr deleted the fix-issue-31904-testclocale branch July 12, 2021 09:40
@kuhlenough kuhlenough mannequin mentioned this pull request Jan 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests Tests in the Lib/test dir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants