Skip to content

Fix bug #81598: Use C.UTF-8 as LC_CTYPE locale by default - #7635

Closed
nikic wants to merge 1 commit into
php:PHP-8.0from
nikic:c-utf8-locale
Closed

nikic wants to merge 1 commit into
php:PHP-8.0from
nikic:c-utf8-locale

Conversation

@nikic

@nikic nikic commented Nov 9, 2021

Copy link
Copy Markdown
Member

Unfortunately, libedit is locale based and does not accept UTF-8
input when the C locale is used. This patch switches the default
locale to C.UTF-8 instead (if it is available). This makes libedit
work and I believe it shouldn't affect behavior of single-byte
locale-dependent functions that PHP otherwise uses.

Unfortunately, libedit is locale based and does not accept UTF-8
input when the C locale is used. This patch switches the default
locale to C.UTF-8 instead (if it is available). This makes libedit
work and I believe it shouldn't affect behavior of single-byte
locale-dependent functions that PHP otherwise uses.
@nikic
nikic requested a review from krakjoe November 9, 2021 11:06
@nikic

nikic commented Nov 9, 2021

Copy link
Copy Markdown
Member Author

It might be possible to undo #7333 as well, not sure if that's a separate problem or not.

@drmnk

drmnk commented Nov 12, 2021

Copy link
Copy Markdown

@nikic how do you think, will this patch be included in PHP 8.1?

Comment thread ext/standard/basic_functions.c Resolved
@cmb69

cmb69 commented Nov 23, 2021

Copy link
Copy Markdown
Member

What's the status here? Are we good with merging into PHP-8.0, or do we first want to merge into PHP-8.1, and cherry-pick later if there are no issues?

@nikic

nikic commented Nov 24, 2021

Copy link
Copy Markdown
Member Author

Merging into 8.1 first sounds reasonable to me.

@krakjoe krakjoe left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This will allow us to revert the change for #7333; I've tested on 8.0 and the fault goes away when we call zend_reset_lc_ctype_locale before readline.

@cmb69 cmb69 added the Bug label Nov 29, 2021
@cmb69

cmb69 commented Dec 1, 2021

Copy link
Copy Markdown
Member

Might be a good idea to ship these fixes with PHP 8.1.1RC1. cc @ramsey, @patrickallaert

@nikic nikic closed this in 26e4244 Dec 5, 2021
@diesse

diesse commented Feb 21, 2022

Copy link
Copy Markdown

The bug is still present in PHP-8.0

@cmb69

cmb69 commented Feb 21, 2022

Copy link
Copy Markdown
Member

Might be sensible to backport into PHP-8.0 now, given that apparently no issues have been reported so far for PHP-8.1. @diesse, consider to submit a respective pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants