hi,
i'm using the code from here: http://phlymail.com/en/downloads/idna/download/ and built a function like this (from the example):
function convert_to_punycode($inputstring)
{
$IDN = new idna_convert();
// The input string, if input is not UTF-8 or UCS-4, it must be converted before
$inputstringutf8 = utf8_encode($inputstring);
// Encode it to its punycode presentation
$outputstringpunycode = $IDN->encode($inputstringutf8);
return $outputstringpunycode;
}
However it doesnt work properly.
For the input: Россию It gives: РоÑÑÐ¸Ñ Whereas it should give: xn--h1alffa3f
What am I doing wrong? $inputstring which is being passed is a normal string with no special declarations/etc...