Location: PHPKode > projects > ObsceneClean > word14.php
<?PHP
echo $_SERVER['HTTP_REFERER'];
echo '<br><br>well? POST OF changestr=';
var_dump($_POST['changestr']);
$changestr = $_POST['changestr'];
// ----------------------------------------
echo '<br> ';echo '<br> ';
if (mb_check_encoding($changestr, 'UTF-8')) {  echo ' mb_check_encoding says is utf8'; }
else {  echo ' mb_check_encoding says is NOT utf8'; }
echo '<br> '; 
echo '<br> ';
// ----------------------------------------
$mbLen = mb_strlen($changestr);
$strLen = strlen($changestr);
echo '<BR> $mbLen=' . $mbLen;
echo '<BR> $strLen=' . $strLen;
// ----------------------------------------
$encode = mb_detect_encoding($changestr, "auto");
echo ' <br> according to mb_detect_encoding $encode=' . $encode;
// ----------------------------------------
// Fold Latin-1 Supplement unicode block
echo '<br>before all   $changestr=';
var_dump($changestr); 
$search  = array('À', 'Á', 'Â', 'Ã', 'Ä', 'Å', 'Ç', 'È', 'É', 'Ê', 'Ë', 'Ì', 'Í', 'Î', 'Ï', 'Ð', 'Ñ', 'Ò', 'Ó', 'Ô', 'Õ', 'Ö', '×', 'Ø', 'Ù', 'Ú', 'Û', 'Ü', 'Ý', 'Þ', 'ß', 'à', 'á', 'â', 'ã', 'ä', 'å', 'ç', 'è', 'é', 'ê', 'ë', 'ì', 'í', 'î', 'ï', 'ð', 'ñ', 'ò', 'ó', 'ô', 'õ', 'ö', 'ø', 'ù', 'ú', 'û', 'ü', 'ý', 'þ', 'ÿ');
$replace = array('A', 'A', 'A', 'A', 'A', 'A', 'C', 'E', 'E', 'E', 'E', 'I', 'I', 'I', 'I', 'D', 'N', 'O', 'O', 'O', 'O', 'O', 'x', 'O', 'U', 'U', 'U', 'U', 'Y', 'b', 'B', 'a', 'a', 'a', 'a', 'a', 'a', 'c', 'e', 'e', 'e', 'e', 'i', 'i', 'i', 'i', 'o', 'n', 'o', 'o', 'o', 'o', 'o', 'o', 'u', 'u', 'u', 'u', 'y', 'b', 'y');
$changestr1 = str_replace($search, $replace, $changestr);
$changestr = $changestr1; 
echo '<br>after 1st fold   $changestr1=';
var_dump($changestr1); 
echo '<br>'; 
exit();


function strToHex($string)
{
    $hex='';
    for ($i=0; $i < strlen($string); $i++)
    {
        $hex .= dechex(ord($string[$i]));
    }
    return $hex;
}
Return current item: ObsceneClean