Hi everyon,
Here is my text file :
100055,䪰䬬054-4889012, (south),并쬲8,78390,erans@hotmail,
102958,,-6418346,052-3964300,⡸ (south),⪺-35/2,84812,amiliv@hotmail,
Here is my code:
<?php
$myText = 'test_gibrish.txt';
$myHandle = fopen($myText,'r');
$myRead = fread($myHandle, filesize($myText));
$enc = mb_detect_encoding($myRead, "UTF-8,ISO-8859-1");
$textArr = explode(',',$myRead);
$str = $textArr[15];
echo $str."<br>";
echo iconv($enc, "ISO-8859-1", $str)."<br />";
echo iconv($enc, "utf-8", $str)."<br />";
echo iconv($enc, "utf-8", $str)."<br />";
echo iconv($enc, "ISO-8859-1//TRANSLIT", $str), PHP_EOL;
echo iconv($enc, "ISO-8859-1//IGNORE", $str), PHP_EOL;
echo iconv($enc, "ISO-8859-1", $str), PHP_EOL;
echo $str.'<br>';
?>
Here is my output
All i get when I run the code is gibrish or error messages.
Get I get an advise how to get rid of my text file’s gibrish?
Thanks