$_length =
strlen($string);
for ($x = 0;
$x <
$_length;
$x++
) { $return .= '%' .
bin2hex($string[$x]);
} return $return;
case 'hexentity':
$return = '';
if (Smarty::
$_MBSTRING) { require_once(SMARTY_PLUGINS_DIR . 'shared.mb_unicode.php'
);
$return = '';
foreach (smarty_mb_to_unicode($string, Smarty::
$_CHARSET) as $unicode) { $return .= '&#x' .
strtoupper(dechex($unicode)) . ';';
} return $return;
} // no MBString fallback
$_length =
strlen($string);
for ($x = 0;
$x <
$_length;
$x++
) { $return .= '&#x' .
bin2hex($string[$x]) . ';';
} return $return;