Hi, im doing a site to check, register, etc of domains, i have to make it IDN compliant. Right now i have something like this:
echo $domain;
$domain = idn_to_ascii($domain);
echo $domain;
$domain = idn_to_utf8($domain);
echo $domain;
and im getting this:
testing123ásd123 xn--testing123sd123-wjb testing123ĂĄsd123
as you can see the decoded string isnt the same as the original i also tried using a class by http://phlymail.com/en/downloads/idna/download/ to do it and im getting the same results
i have tried using:
$charset="UTF-8";
echo $domain;
$domain = idn_to_ascii($domain, $charset);
echo $domain;
$domain = idn_to_utf8($domain);
echo $domain;
and i got exactly the same (except that the encoded string is slightly different)
any ideas?
EDIT: Problem solved! with this http://stackoverflow.com/questions/3132430/problem-in-converting-string-to-puny-code-in-php-using-phlylabss-punycode-stri the original string was in iso-8859-2 and the decoded in UTF-8, now i need to find how to make it iso-8859-2 again but google can help me with that. Any mods? what should i do with the question? close it, erase it? leave it this way?