2 url parser multibyte/locale/idna
6 if (!defined("http\\Url::PARSE_MBLOC") or
7 !defined("http\\Url::PARSE_TOIDN") or
8 !stristr(setlocale(LC_CTYPE, NULL), ".utf")) {
9 die("skip need http\\Url::PARSE_MBLOC|http\\Url::PARSE_TOIDN support and LC_CTYPE=*.UTF-8");
18 "s\xc3\xa7heme://h\xc6\x9fst",
19 "s\xc3\xa7heme://h\xc6\x9fst:23/päth/öf/fıle"
22 foreach ($urls as $url) {
23 printf("\n%s\n", $url);
24 var_dump(new http\Url($url, null, http\Url::PARSE_MBLOC|http\Url::PARSE_TOIDN));
32 object(http\Url)#%d (8) {
52 object(http\Url)#%d (8) {
60 string(11) "xn--hst-kwb"
71 sçheme://hƟst:23/päth/öf/fıle
72 object(http\Url)#%d (8) {
80 string(11) "xn--hst-kwb"
84 string(16) "/päth/öf/fıle"