-
Notifications
You must be signed in to change notification settings - Fork 152
Uri implementation does not support the utf8 uri's #155
Comments
Can you create a Unit Test which demonstrates the issue? |
|
I added your provided Test locally, and the Test did not failed. And please also created a PR with this Unit Test, so we can see, the result on Travis. |
Yeah looks like it is my environment which is Mac OS X EL Capitan 10.11.2 (15C50) with PHP 5.5.30 (cli) (built: Oct 23 2015 17:21:45). When I run the tests I'm getting this output: There was 1 failure:
Not sure what's going on and what I need to configure to make it work. Running tests on CentOS works fine and the travis build successful. |
I think this issue can be closed for now. |
I've run into this issue myself when trying to run the unit tests on my machine, and it appears to be due to locale settings, specifically the This locale setting is automatically determined based on the
I'm really just posting this here for future reference in case anybody else hits this issue, I don't think there's anything that can be changed in this library since the problem happens in However, this behaviour does lead to fatal errors for |
@Pudge601 what if we check: $url === unparse_url(parse_url($url)) Do you think it's gonna help? Are you saying that "invalid characters" are returned from |
It wouldn't be possible to write a Quite simply, I had intended for my comment to just be informative for anyone else who found this issue rather than suggesting that anything needed to be done in this library, but I guess if this library is purporting to support UTF-8, then it could be considered broken at the moment in the sense that it doesn't work in differing locales. There are a couple of options I can think of to try and support UTF8 URIs in this library;
Or alternatively this library could simply reject URI's with extended characters which aren't properly encoded, as they are technically invalid according to RFC 3986. Whichever way, it might be worth adding something to the Travis config to run the tests under different locale environments to show how this is reproduced in the unit tests (though this might be a pain, since the available values for the locale are platform dependent). |
@Pudge601 Could you open a new issue and/or PR, using the text from your previous comment as background, please? |
Uri implementation does not support utf8 uri's because of PHP parse_url function (see https://secure.php.net/manual/en/function.parse-url.php#114817)
The text was updated successfully, but these errors were encountered: