![]() |
Punycode converter not working on ONE page - why?
I have another strange problem. Since I work a lot with URLs
PHP Code:
Any clue why that is? PS: I am on PHP 5.3.1 |
Simple: Domain zürich.eu (or xn--zrich-kva.eu) isn't available at all.
Just enter those 4 in your browser. All of them work, apart from zürich.eu or xn--zrich-kva.eu. |
Quote:
|
I am still totally puzzled. I put the code from the top into the page that gives me trouble - and the top parts works.
Japanese works, Chinese works, ä ü ö do NOT work, but ő works, but ñ does not. It works when I string them up in an array and decode them in a FOREACH loop. I can add a variable with a value into the Array. But when I put the same url into a variable (not array!) and then into the test array it will not work. I got already a new idna_convert.class.php - same issue. PS: Same error with PHP 5.4.7 |
I still can't solve this problem. I presume it's related to the charcater encoding. All problem domain names are in ASCII format. Even though the original HTML source format is UTF-8.
I presume the output from preg_match_all is in ASCII - now need to check either how to convert it back, or how to make preg_match_all output UTF-8. After it is ASCII the data is extremely resistant to changes and I didn't manage you to get it back to UTF-8. I don't understand why utf8_encode() or mb_convert_encoding() fail to work. |
Solved! This REALLY took me some time!
I tried to work it via mySQL and noted that whatever I try, data gets input as i.e. solglasögon.net instead of solglasögon.net I then did a try and put this before the string: PHP Code:
Not to do a str_replace() for every special character I did: PHP Code:
|
| All times are GMT +1. The time now is 12:19 PM. |
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.