I am reading one Persian text file (using PHP) with the help of below code:
/* Reading the file name and the book (UTF-8) */
if(file_exists($SourceDirectoryFile)
final and best solution is this: use this line under your connect
mysqli_set_charset( $con, 'utf8');
like this:
$con = mysqli_connect("localhost","root","amirahmad","shoutit");
mysqli_set_charset( $con, 'utf8');
and at the end add this line right under the head tag in your html to make sure your page have utf-8 charset,like this:
and that's it . you can read formal document here : pph.net charset