0

snapshot of the result i

that's what I tried and ended with question marks like the snapshot above , I don't know how to get rid of these question marks and get the correct arabic charset instead , anyone help

 if (is_dir($dir)){
  if ($dh = opendir($dir)){
    while (($file = readdir($dh)) !== false){
      if ($file != "." && $file != "..") {
        $file_utf8 = iconv( "CP1256", "UTF-8", $file );
        echo  $file_utf8 . "<br>";
      }
    }
    closedir($dh);
  }
PHP lover
  • 1
  • 1
  • have you checked these [SO answer](http://stackoverflow.com/questions/38462631/php-file-get-content-arabic-characters) and [SO answer](http://stackoverflow.com/questions/13677350/troubles-displaying-arabic-text) and [SO answer](http://stackoverflow.com/questions/2309496/php-print-arabic-string) ? – OldPadawan Apr 08 '17 at 17:22
  • yes, none of these answers are helping. – PHP lover Apr 08 '17 at 20:18

0 Answers0