$bad_string = "Luis Pérez Casas, del Collettivo di avvocati “José Alvear Restrepoâ,ドル Colombia, unâ€TMorganizzazione soggetta a costanti minacce";
$good_string = fix_broken_chars($bad_string);
echo $good_string;
function fix_broken_chars($garbled_utf8_string)
{
$conv_table = unserialize('a:45:{i:0;a:3:{s:8:"â€TM";s:3:"’";s:8:"â€"";s:3:"–";s:8:"â€"";s:3:"—";}i:1;a:12:{s:7:"€";s:3:"€";s:7:"‚";s:3:"‚";s:7:"„";s:3:"„";s:7:"…";s:3:"...";s:7:"‡";s:3:"‡";s:7:"‰";s:3:"‰";s:7:"â1ドル";s:3:"‹";s:7:"†̃";s:3:"‘";s:7:"“";s:3:""";s:7:"•";s:3:"•";s:7:"â„¢";s:3:"TM";s:7:"â€o";s:3:"›";}i:2;a:22:{s:5:"À";s:2:"À";s:5:"Â";s:2:"Â";s:5:"Æ’";s:2:"ƒ";s:5:"Ä";s:2:"Ä";s:5:"Ã...";s:2:"Å";s:5:"â€";s:3:""";s:5:"Æ";s:2:"Æ";s:5:"Ç";s:2:"Ç";s:5:"ˆ";s:2:"ˆ";s:5:"É";s:2:"É";s:5:"Ë";s:2:"Ë";s:5:"Å’";s:2:"Œ";s:5:"Ñ";s:2:"Ñ";s:5:"Ã’";s:2:"Ò";s:5:"Ã"";s:2:"Ó";s:5:"Ã"";s:2:"Ô";s:5:"Õ";s:2:"Õ";s:5:"Ö";s:2:"Ö";s:5:"×";s×ばつ";s:5:"ÃTM";s:2:"Ù";s:5:"Û";s:2:"Û";s:5:"Å"";s:2:"œ";}i:3;a:77:{s:4:"Ã";s:2:"Ã";s:4:"È";s:2:"È";s:4:"Ê";s:2:"Ê";s:4:"ÃŒ";s:2:"Ì";s:4:"Å1⁄2";s:2:"Ž";s:4:"ÃŽ";s:2:"Î";s:4:"Ëœ";s:2:" ̃";s:4:"à ̃";s:2:"Ø";s:4:"Å¡";s:2:"š";s:4:"Ú";s:2:"Ú";s:4:"Ü";s:2:"Ü";s:4:"Å3⁄4";s:2:"ž";s:4:"Þ";s:2:"Þ";s:4:"Å ̧";s:2:"Ÿ";s:4:"ß";s:2:"ß";s:4:"¡";s:2:"¡";s:4:"á";s:2:"á";s:4:"¢";s:2:"¢";s:4:"â";s:2:"â";s:4:"£";s:2:"£";s:4:"ã";s:2:"ã";s:4:"¤";s:2:"¤";s:4:"ä";s:2:"ä";s:4:"Â\";s:2:"\";s:4:"Ã\";s:2:"å";s:4:"¦";s:2:"¦";s:4:"æ";s:2:"æ";s:4:"§";s:2:"§";s:4:"ç";s:2:"ç";s:4:" ̈";s:2:" ̈";s:4:"à ̈";s:2:"è";s:4:"©";s:2:"©";s:4:"é";s:2:"é";s:4:"Âa";s:2:"a";s:4:"Ãa";s:2:"ê";s:4:"«";s:2:"«";s:4:"ë";s:2:"ë";s:4:"¬";s:2:"¬";s:4:"ì";s:2:"ì";s:4:"Â";s:2:"";s:4:"Ã";s:2:"í";s:4:"®";s:2:"®";s:4:"î";s:2:"î";s:4:" ̄";s:2:" ̄";s:4:"à ̄";s:2:"ï";s:4:"°";s:2:"°";s:4:"ð";s:2:"ð";s:4:"±";s:2:"±";s:4:"ñ";s:2:"ñ";s:4:"Â2";s:2:"2";s:4:"Ã2";s:2:"ò";s:4:"Â3";s:2:"3";s:4:"Ã3";s:2:"ó";s:4:" ́";s:2:" ́";s:4:"à ́";s:2:"ô";s:4:"Âμ";s:2:"μ";s:4:"Ãμ";s:2:"õ";s:4:"¶";s:2:"¶";s:4:"ö";s:2:"ö";s:4:"·";s:2:"·";s:4:"÷";s:2:"÷";s:4:" ̧";s:2:" ̧";s:4:"à ̧";s:2:"ø";s:4:"Â1";s:2:"1";s:4:"Ã1";s:2:"ù";s:4:"Âo";s:2:"o";s:4:"Ão";s:2:"ú";s:4:"»";s:2:"»";s:4:"û";s:2:"û";s:4:"Â1⁄4";s:2:"1⁄4";s:4:"Ã1⁄4";s:2:"ü";s:4:"Â1⁄2";s:2:"1⁄2";s:4:"Ã1⁄2";s:2:"ý";s:4:"Â3⁄4";s:2:"3⁄4";s:4:"Ã3⁄4";s:2:"þ";s:4:"¿";s:2:"¿";s:4:"ÿ";s:2:"ÿ";}i:4;a:1:{s:2:"Ã";s:2:"à";}}');
foreach ($conv_table as $convert) {
$garbled_utf8_string = str_replace(array_keys($convert), $convert, $garbled_utf8_string);
}
return $garbled_utf8_string;
}
Implements conversion according to this table http://www.i18nqa.com/debug/utf8-debug.html
$bad_string = "Luis Pérez Casas, del Collettivo di avvocati “José Alvear Restrepoâ,ドル Colombia, unâ€TMorganizzazione soggetta a costanti minacce";
$good_string = fix_broken_chars($bad_string);
echo $good_string;
function fix_broken_chars($garbled_utf8_string)
{
$conv_table = unserialize('a:4:{i:0;a:3:{s:8:"â€TM";s:3:"’";s:8:"â€"";s:3:"–";s:8:"â€"";s:3:"—";}i:1;a:12:{s:7:"€";s:3:"€";s:7:"‚";s:3:"‚";s:7:"„";s:3:"„";s:7:"…";s:3:"...";s:7:"‡";s:3:"‡";s:7:"‰";s:3:"‰";s:7:"â1ドル";s:3:"‹";s:7:"†̃";s:3:"‘";s:7:"“";s:3:""";s:7:"•";s:3:"•";s:7:"â„¢";s:3:"TM";s:7:"â€o";s:3:"›";}i:2;a:22:{s:5:"À";s:2:"À";s:5:"Â";s:2:"Â";s:5:"Æ’";s:2:"ƒ";s:5:"Ä";s:2:"Ä";s:5:"Ã...";s:2:"Å";s:5:"â€";s:3:""";s:5:"Æ";s:2:"Æ";s:5:"Ç";s:2:"Ç";s:5:"ˆ";s:2:"ˆ";s:5:"É";s:2:"É";s:5:"Ë";s:2:"Ë";s:5:"Å’";s:2:"Œ";s:5:"Ñ";s:2:"Ñ";s:5:"Ã’";s:2:"Ò";s:5:"Ã"";s:2:"Ó";s:5:"Ã"";s:2:"Ô";s:5:"Õ";s:2:"Õ";s:5:"Ö";s:2:"Ö";s:5:"×";s×ばつ";s:5:"ÃTM";s:2:"Ù";s:5:"Û";s:2:"Û";s:5:"Å"";s:2:"œ";}i:3;a:77:{s:4:"Ã";s:2:"Ã";s:4:"È";s:2:"È";s:4:"Ê";s:2:"Ê";s:4:"ÃŒ";s:2:"Ì";s:4:"Å1⁄2";s:2:"Ž";s:4:"ÃŽ";s:2:"Î";s:4:"Ëœ";s:2:" ̃";s:4:"à ̃";s:2:"Ø";s:4:"Å¡";s:2:"š";s:4:"Ú";s:2:"Ú";s:4:"Ü";s:2:"Ü";s:4:"Å3⁄4";s:2:"ž";s:4:"Þ";s:2:"Þ";s:4:"Å ̧";s:2:"Ÿ";s:4:"ß";s:2:"ß";s:4:"¡";s:2:"¡";s:4:"á";s:2:"á";s:4:"¢";s:2:"¢";s:4:"â";s:2:"â";s:4:"£";s:2:"£";s:4:"ã";s:2:"ã";s:4:"¤";s:2:"¤";s:4:"ä";s:2:"ä";s:4:"Â\";s:2:"\";s:4:"Ã\";s:2:"å";s:4:"¦";s:2:"¦";s:4:"æ";s:2:"æ";s:4:"§";s:2:"§";s:4:"ç";s:2:"ç";s:4:" ̈";s:2:" ̈";s:4:"à ̈";s:2:"è";s:4:"©";s:2:"©";s:4:"é";s:2:"é";s:4:"Âa";s:2:"a";s:4:"Ãa";s:2:"ê";s:4:"«";s:2:"«";s:4:"ë";s:2:"ë";s:4:"¬";s:2:"¬";s:4:"ì";s:2:"ì";s:4:"Â";s:2:"";s:4:"Ã";s:2:"í";s:4:"®";s:2:"®";s:4:"î";s:2:"î";s:4:" ̄";s:2:" ̄";s:4:"à ̄";s:2:"ï";s:4:"°";s:2:"°";s:4:"ð";s:2:"ð";s:4:"±";s:2:"±";s:4:"ñ";s:2:"ñ";s:4:"Â2";s:2:"2";s:4:"Ã2";s:2:"ò";s:4:"Â3";s:2:"3";s:4:"Ã3";s:2:"ó";s:4:" ́";s:2:" ́";s:4:"à ́";s:2:"ô";s:4:"Âμ";s:2:"μ";s:4:"Ãμ";s:2:"õ";s:4:"¶";s:2:"¶";s:4:"ö";s:2:"ö";s:4:"·";s:2:"·";s:4:"÷";s:2:"÷";s:4:" ̧";s:2:" ̧";s:4:"à ̧";s:2:"ø";s:4:"Â1";s:2:"1";s:4:"Ã1";s:2:"ù";s:4:"Âo";s:2:"o";s:4:"Ão";s:2:"ú";s:4:"»";s:2:"»";s:4:"û";s:2:"û";s:4:"Â1⁄4";s:2:"1⁄4";s:4:"Ã1⁄4";s:2:"ü";s:4:"Â1⁄2";s:2:"1⁄2";s:4:"Ã1⁄2";s:2:"ý";s:4:"Â3⁄4";s:2:"3⁄4";s:4:"Ã3⁄4";s:2:"þ";s:4:"¿";s:2:"¿";s:4:"ÿ";s:2:"ÿ";}}');
foreach ($conv_table as $convert) {
$garbled_utf8_string = str_replace(array_keys($convert), $convert, $garbled_utf8_string);
}
return $garbled_utf8_string;
}
Implements conversion according to this table http://www.i18nqa.com/debug/utf8-debug.html
$bad_string = "Luis Pérez Casas, del Collettivo di avvocati “José Alvear Restrepoâ,ドル Colombia, unâ€TMorganizzazione soggetta a costanti minacce";
$good_string = fix_broken_chars($bad_string);
echo $good_string;
function fix_broken_chars($garbled_utf8_string)
{
$conv_table = unserialize('a:5:{i:0;a:3:{s:8:"â€TM";s:3:"’";s:8:"â€"";s:3:"–";s:8:"â€"";s:3:"—";}i:1;a:12:{s:7:"€";s:3:"€";s:7:"‚";s:3:"‚";s:7:"„";s:3:"„";s:7:"…";s:3:"...";s:7:"‡";s:3:"‡";s:7:"‰";s:3:"‰";s:7:"â1ドル";s:3:"‹";s:7:"†̃";s:3:"‘";s:7:"“";s:3:""";s:7:"•";s:3:"•";s:7:"â„¢";s:3:"TM";s:7:"â€o";s:3:"›";}i:2;a:22:{s:5:"À";s:2:"À";s:5:"Â";s:2:"Â";s:5:"Æ’";s:2:"ƒ";s:5:"Ä";s:2:"Ä";s:5:"Ã...";s:2:"Å";s:5:"â€";s:3:""";s:5:"Æ";s:2:"Æ";s:5:"Ç";s:2:"Ç";s:5:"ˆ";s:2:"ˆ";s:5:"É";s:2:"É";s:5:"Ë";s:2:"Ë";s:5:"Å’";s:2:"Œ";s:5:"Ñ";s:2:"Ñ";s:5:"Ã’";s:2:"Ò";s:5:"Ã"";s:2:"Ó";s:5:"Ã"";s:2:"Ô";s:5:"Õ";s:2:"Õ";s:5:"Ö";s:2:"Ö";s:5:"×";s×ばつ";s:5:"ÃTM";s:2:"Ù";s:5:"Û";s:2:"Û";s:5:"Å"";s:2:"œ";}i:3;a:77:{s:4:"Ã";s:2:"Ã";s:4:"È";s:2:"È";s:4:"Ê";s:2:"Ê";s:4:"ÃŒ";s:2:"Ì";s:4:"Å1⁄2";s:2:"Ž";s:4:"ÃŽ";s:2:"Î";s:4:"Ëœ";s:2:" ̃";s:4:"à ̃";s:2:"Ø";s:4:"Å¡";s:2:"š";s:4:"Ú";s:2:"Ú";s:4:"Ü";s:2:"Ü";s:4:"Å3⁄4";s:2:"ž";s:4:"Þ";s:2:"Þ";s:4:"Å ̧";s:2:"Ÿ";s:4:"ß";s:2:"ß";s:4:"¡";s:2:"¡";s:4:"á";s:2:"á";s:4:"¢";s:2:"¢";s:4:"â";s:2:"â";s:4:"£";s:2:"£";s:4:"ã";s:2:"ã";s:4:"¤";s:2:"¤";s:4:"ä";s:2:"ä";s:4:"Â\";s:2:"\";s:4:"Ã\";s:2:"å";s:4:"¦";s:2:"¦";s:4:"æ";s:2:"æ";s:4:"§";s:2:"§";s:4:"ç";s:2:"ç";s:4:" ̈";s:2:" ̈";s:4:"à ̈";s:2:"è";s:4:"©";s:2:"©";s:4:"é";s:2:"é";s:4:"Âa";s:2:"a";s:4:"Ãa";s:2:"ê";s:4:"«";s:2:"«";s:4:"ë";s:2:"ë";s:4:"¬";s:2:"¬";s:4:"ì";s:2:"ì";s:4:"Â";s:2:"";s:4:"Ã";s:2:"í";s:4:"®";s:2:"®";s:4:"î";s:2:"î";s:4:" ̄";s:2:" ̄";s:4:"à ̄";s:2:"ï";s:4:"°";s:2:"°";s:4:"ð";s:2:"ð";s:4:"±";s:2:"±";s:4:"ñ";s:2:"ñ";s:4:"Â2";s:2:"2";s:4:"Ã2";s:2:"ò";s:4:"Â3";s:2:"3";s:4:"Ã3";s:2:"ó";s:4:" ́";s:2:" ́";s:4:"à ́";s:2:"ô";s:4:"Âμ";s:2:"μ";s:4:"Ãμ";s:2:"õ";s:4:"¶";s:2:"¶";s:4:"ö";s:2:"ö";s:4:"·";s:2:"·";s:4:"÷";s:2:"÷";s:4:" ̧";s:2:" ̧";s:4:"à ̧";s:2:"ø";s:4:"Â1";s:2:"1";s:4:"Ã1";s:2:"ù";s:4:"Âo";s:2:"o";s:4:"Ão";s:2:"ú";s:4:"»";s:2:"»";s:4:"û";s:2:"û";s:4:"Â1⁄4";s:2:"1⁄4";s:4:"Ã1⁄4";s:2:"ü";s:4:"Â1⁄2";s:2:"1⁄2";s:4:"Ã1⁄2";s:2:"ý";s:4:"Â3⁄4";s:2:"3⁄4";s:4:"Ã3⁄4";s:2:"þ";s:4:"¿";s:2:"¿";s:4:"ÿ";s:2:"ÿ";}i:4;a:1:{s:2:"Ã";s:2:"à";}}');
foreach ($conv_table as $convert) {
$garbled_utf8_string = str_replace(array_keys($convert), $convert, $garbled_utf8_string);
}
return $garbled_utf8_string;
}
Implements this table http://www.i18nqa.com/debug/utf8-debug.html
Implements conversion according to this table http://www.i18nqa.com/debug/utf8-debug.html
Implements this table http://www.i18nqa.com/debug/utf8-debug.html
Implements conversion according to this table http://www.i18nqa.com/debug/utf8-debug.html
$bad_string = "Luis Pérez Casas, del Collettivo di avvocati “José Alvear Restrepoâ,ドル Colombia, unâ€TMorganizzazione soggetta a costanti minacce";
$good_string = fix_broken_chars($bad_string);
echo $good_string;
function fix_broken_chars($garbled_utf8_string)
{
$conv_table = unserialize('a:4:{i:0;a:3:{s:8:"â€TM";s:3:"’";s:8:"â€"";s:3:"–";s:8:"â€"";s:3:"—";}i:1;a:12:{s:7:"€";s:3:"€";s:7:"‚";s:3:"‚";s:7:"„";s:3:"„";s:7:"…";s:3:"...";s:7:"‡";s:3:"‡";s:7:"‰";s:3:"‰";s:7:"â1ドル";s:3:"‹";s:7:"†̃";s:3:"‘";s:7:"“";s:3:""";s:7:"•";s:3:"•";s:7:"â„¢";s:3:"TM";s:7:"â€o";s:3:"›";}i:2;a:22:{s:5:"À";s:2:"À";s:5:"Â";s:2:"Â";s:5:"Æ’";s:2:"ƒ";s:5:"Ä";s:2:"Ä";s:5:"Ã...";s:2:"Å";s:5:"â€";s:3:""";s:5:"Æ";s:2:"Æ";s:5:"Ç";s:2:"Ç";s:5:"ˆ";s:2:"ˆ";s:5:"É";s:2:"É";s:5:"Ë";s:2:"Ë";s:5:"Å’";s:2:"Œ";s:5:"Ñ";s:2:"Ñ";s:5:"Ã’";s:2:"Ò";s:5:"Ã"";s:2:"Ó";s:5:"Ã"";s:2:"Ô";s:5:"Õ";s:2:"Õ";s:5:"Ö";s:2:"Ö";s:5:"×";s×ばつ";s:5:"ÃTM";s:2:"Ù";s:5:"Û";s:2:"Û";s:5:"Å"";s:2:"œ";}i:3;a:77:{s:4:"Ã";s:2:"Ã";s:4:"È";s:2:"È";s:4:"Ê";s:2:"Ê";s:4:"ÃŒ";s:2:"Ì";s:4:"Å1⁄2";s:2:"Ž";s:4:"ÃŽ";s:2:"Î";s:4:"Ëœ";s:2:" ̃";s:4:"à ̃";s:2:"Ø";s:4:"Å¡";s:2:"š";s:4:"Ú";s:2:"Ú";s:4:"Ü";s:2:"Ü";s:4:"Å3⁄4";s:2:"ž";s:4:"Þ";s:2:"Þ";s:4:"Å ̧";s:2:"Ÿ";s:4:"ß";s:2:"ß";s:4:"¡";s:2:"¡";s:4:"á";s:2:"á";s:4:"¢";s:2:"¢";s:4:"â";s:2:"â";s:4:"£";s:2:"£";s:4:"ã";s:2:"ã";s:4:"¤";s:2:"¤";s:4:"ä";s:2:"ä";s:4:"Â\";s:2:"\";s:4:"Ã\";s:2:"å";s:4:"¦";s:2:"¦";s:4:"æ";s:2:"æ";s:4:"§";s:2:"§";s:4:"ç";s:2:"ç";s:4:" ̈";s:2:" ̈";s:4:"à ̈";s:2:"è";s:4:"©";s:2:"©";s:4:"é";s:2:"é";s:4:"Âa";s:2:"a";s:4:"Ãa";s:2:"ê";s:4:"«";s:2:"«";s:4:"ë";s:2:"ë";s:4:"¬";s:2:"¬";s:4:"ì";s:2:"ì";s:4:"Â";s:2:"";s:4:"Ã";s:2:"í";s:4:"®";s:2:"®";s:4:"î";s:2:"î";s:4:" ̄";s:2:" ̄";s:4:"à ̄";s:2:"ï";s:4:"°";s:2:"°";s:4:"ð";s:2:"ð";s:4:"±";s:2:"±";s:4:"ñ";s:2:"ñ";s:4:"Â2";s:2:"2";s:4:"Ã2";s:2:"ò";s:4:"Â3";s:2:"3";s:4:"Ã3";s:2:"ó";s:4:" ́";s:2:" ́";s:4:"à ́";s:2:"ô";s:4:"Âμ";s:2:"μ";s:4:"Ãμ";s:2:"õ";s:4:"¶";s:2:"¶";s:4:"ö";s:2:"ö";s:4:"·";s:2:"·";s:4:"÷";s:2:"÷";s:4:" ̧";s:2:" ̧";s:4:"à ̧";s:2:"ø";s:4:"Â1";s:2:"1";s:4:"Ã1";s:2:"ù";s:4:"Âo";s:2:"o";s:4:"Ão";s:2:"ú";s:4:"»";s:2:"»";s:4:"û";s:2:"û";s:4:"Â1⁄4";s:2:"1⁄4";s:4:"Ã1⁄4";s:2:"ü";s:4:"Â1⁄2";s:2:"1⁄2";s:4:"Ã1⁄2";s:2:"ý";s:4:"Â3⁄4";s:2:"3⁄4";s:4:"Ã3⁄4";s:2:"þ";s:4:"¿";s:2:"¿";s:4:"ÿ";s:2:"ÿ";}}');
foreach ($conv_table as $convert) {
$garbled_utf8_string = str_replace(array_keys($convert), $convert, $garbled_utf8_string);
}
return $garbled_utf8_string;
}
Implements this table http://www.i18nqa.com/debug/utf8-debug.html