framework/validators/CUrlValidator.php
private function decodeIDN($value)
	{
		if(preg_match_all('/^(.*):\/\/([^\/]+)(.*)$/',$value,$matches))
		{
			if(function_exists('idn_to_utf8'))
				$value=$matches[1][0].'://'.idn_to_utf8($matches[2][0]).$matches[3][0];
			else
			{
				require_once(Yii::getPathOfAlias('system.vendors.Net_IDNA2.Net').DIRECTORY_SEPARATOR.'IDNA2.php');
				$idna=new Net_IDNA2();
				$value=$matches[1][0].'://'.@$idna->decode($matches[2][0]).$matches[3][0];
			}
		}
		return $value;
	}
private function decodeIDN($value)
	{
		if(preg_match_all('/^(.*):\/\/([^\/]+)(.*)$/',$value,$matches))
		{
			if(function_exists('idn_to_utf8'))
				$value=$matches[1][0].'://'.idn_to_utf8($matches[2][0]).$matches[3][0];
			else
			{
				require_once(Yii::getPathOfAlias('system.vendors.Net_IDNA2.Net').DIRECTORY_SEPARATOR.'IDNA2.php');
				$idna=new Net_IDNA2();
				$value=$matches[1][0].'://'.@$idna->decode($matches[2][0]).$matches[3][0];
			}
		}
		return $value;
	}
private function decodeIDN ( $ value ) { if ( preg_match_all ( '/^(.*):\/\/([^\/]+)(.*)$/' , $ value , $ matches ) ) { if ( function_exists ( 'idn_to_utf8' ) ) $ value = $ matches [ 1 ] [ 0 ] . '://' . idn_to_utf8 ( $ matches [ 2 ] [ 0 ] ) . $ matches [ 3 ] [ 0 ] ; else { require_once ( Yii :: getPathOfAlias ( 'system.vendors.Net_IDNA2.Net' ) . DIRECTORY_SEPARATOR . 'IDNA2.php' ) ; $ idna = new Net_IDNA2 ( ) ; $ value = $ matches [ 1 ] [ 0 ] . '://' . @ $ idna -> decode ( $ matches [ 2 ] [ 0 ] ) . $ matches [ 3 ] [ 0 ] ; } } return $ value ; }
Converts given punycode to the IDN.
@param string $value punycode to be converted.
@return string resulting IDN.
@since 1.1.13
Converts given punycode to the IDN .