Skip to content
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

Don't expose wchar encoding to users #7415

Merged
merged 1 commit into from
Aug 30, 2021
Merged

Conversation

nikic
Copy link
Member

@nikic nikic commented Aug 27, 2021

The "wchar" encoding isn't really an encoding -- it's what we
internally use as the representation of decoded characters.

In practice, it tends to behave a lot like the 8bit encoding when
used from userland, because input code units end up being treated
as code points.

This patch removes the wchar encoding from the public encoding
list and reserves it for internal use only.

The "wchar" encoding isn't really an encoding -- it's what we
internally use as the representation of decoded characters.

In practice, it tends to behave a lot like the 8bit encoding when
used from userland, because input code units end up being treated
as code points.

This patch removes the wchar encoding from the public encoding
list and reserves it for internal use only.
@nikic nikic requested a review from alexdowad August 27, 2021 12:34
@nikic
Copy link
Member Author

nikic commented Aug 27, 2021

Based on the fact that this doesn't cause a single test failure, and there are no relevant usages of 'wchar' or "wchar" on grep.app, I'm assuming it's pretty safe to drop this.

Only found reference is https://github.com/gggeek/phpxmlrpc/blob/b337d292eb5b5656d27a2fc9ab6796be300c59a3/src/Client.php#L205, which is about explicitly removing wchar from the encoding list and commented code besides...

@cmb69
Copy link
Contributor

cmb69 commented Aug 27, 2021

The manual doesn't even mention the wchar encoding.

@kamil-tekiela
Copy link
Member

+1 from me.

Do we even need this internally?

@alexdowad
Copy link
Contributor

+1 from me.

Do we even need this internally?

Currently, it is definitely needed internally. After some more refactoring... it may not be.

@alexdowad
Copy link
Contributor

This is a good step. Thanks!

Copy link
Contributor

@alexdowad alexdowad left a comment

Choose a reason for hiding this comment

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

This is great!

@nikic nikic merged commit 634f2e2 into php:master Aug 30, 2021
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.

None yet

4 participants