Created
June 3, 2012 03:04
-
-
Save prototech/2861637 to your computer and use it in GitHub Desktop.
Confusables test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
define('IN_PHPBB', true); | |
$phpbb_root_path = './'; | |
$phpEx = substr(strrchr(__FILE__, '.'), 1); | |
include($phpbb_root_path . 'common.' . $phpEx); | |
$homographs = include($phpbb_root_path . 'includes/utf/data/confusables.' . $phpEx); | |
$i = 1; | |
foreach ($homographs as $from => $to) | |
{ | |
// Is the value getting reversed? | |
if (utf8_clean_string($to) == $from) | |
{ | |
echo "Reversal happening at pair $i- $from : $to <br />"; | |
} | |
// Check if value from pair 1309 exists | |
if (utf8_strpos($to, 'ǃ') !== false) | |
{ | |
echo "1309 value appears at $i <br />"; | |
} | |
$i++; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment