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

Locale independent \parse_url() wrapper for UTF-8 strings #269

Closed

Conversation

alexeyshockov
Copy link
Collaborator

\parse_url() breaks UTF-8 domain names (IDN) when used with locales other than "C". This PR introduces a small wrapper around the internal function to make Guzzle locale independent (and those more usable when you work with IDNs).

P.S.

For 2.x branch leageu/uri-parser worths a try, IMO. It's a pure PHP implementation that is compatible with `\parse_url() that works nicely with UTF-8 and is more compatible with the standard.

Copy link
Member

@Tobion Tobion left a comment

Choose a reason for hiding this comment

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

Please add tests for this

@alexeyshockov
Copy link
Collaborator Author

Closing this PR, because master is pointing on 2.x already (and the code was written with 1.x in mind). I will reopen it for 1.x branch and also prepare a new one for master (where we now are able to use league\uri directly).

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

Successfully merging this pull request may close these issues.

None yet

2 participants