Skip to content

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

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

Closed
wants to merge 1 commit into from

Conversation

nikic
Copy link
Member

@nikic nikic commented Nov 9, 2021

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
Copy link
Member Author

nikic commented Nov 9, 2021

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

@drmnk
Copy link

drmnk commented Nov 12, 2021

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

@cmb69
Copy link
Member

cmb69 commented Nov 23, 2021

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
Copy link
Member Author

nikic commented Nov 24, 2021

Merging into 8.1 first sounds reasonable to me.

Copy link
Member

@krakjoe krakjoe left a comment

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
Copy link
Member

cmb69 commented Dec 1, 2021

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
Copy link

diesse commented Feb 21, 2022

The bug is still present in PHP-8.0

@cmb69
Copy link
Member

cmb69 commented Feb 21, 2022

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