Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

bpo-34485, Windows: LC_CTYPE set to user preference#8988

Merged
vstinner merged 2 commits into
python:masterpython/cpython:masterfrom
vstinner:ctype_localeCopy head branch name to clipboard
Aug 29, 2018
Merged

bpo-34485, Windows: LC_CTYPE set to user preference#8988
vstinner merged 2 commits into
python:masterpython/cpython:masterfrom
vstinner:ctype_localeCopy head branch name to clipboard

Conversation

@vstinner

@vstinner vstinner commented Aug 29, 2018

Copy link
Copy Markdown
Member

On Windows, the LC_CTYPE is now set to the user preferred locale at
startup: _Py_SetLocaleFromEnv(LC_CTYPE) is now called during the
Python initialization. Previously, the LC_CTYPE locale was "C" at
startup, but changed when calling setlocale(LC_CTYPE, "") or
setlocale(LC_ALL, "").

pymain_read_conf() now also calls _Py_SetLocaleFromEnv(LC_CTYPE) to
behave as _Py_InitializeCore(). Moreover, it doesn't save/restore the
LC_ALL anymore.

https://bugs.python.org/issue34485

On Windows, the LC_CTYPE is now set to the user preferred locale at
startup: _Py_SetLocaleFromEnv(LC_CTYPE) is now called during the
Python initialization. Previously, the LC_CTYPE locale was "C" at
startup, but changed when calling setlocale(LC_CTYPE, "") or
setlocale(LC_ALL, "").

pymain_read_conf() now also calls _Py_SetLocaleFromEnv(LC_CTYPE) to
behave as _Py_InitializeCore(). Moreover, it doesn't save/restore the
LC_ALL anymore.
On Windows, standard streams like sys.stdout now always use
surrogateescape error handler by default.
@vstinner vstinner merged commit 177d921 into python:master Aug 29, 2018
@vstinner vstinner deleted the ctype_locale branch August 29, 2018 09:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.