I have another strange problem. Since I work a lot with URLs
PHP Code:
include_once('idna_convert.class.php');
$IDN = new idna_convert();
$feeder = array("glühwein.dk","你好吗.com","madrid.com","zürich.eu","hallo.de");
foreach( $feeder as $key => $value )
{
echo $value."<br>";
$url = $IDN->encode($value);
echo $url."<p>";
}
/*
Output:
glühwein.dk
xn--glhwein-o2a.dk
你好吗.com
xn--6qqu8ipsf.com
madrid.com
madrid.com
zürich.eu
xn--zrich-kva.eu
hallo.de
hallo.de
*/
The sample page outputs exactly as above. However, in my 'real' page it works perfectly only on not alphanumeric URLs (Chinese, Japanese) - but not on URLs with ü , ö etc. Could it be performance related?
Any clue why that is?
PS: I am on PHP 5.3.1