title: fopen can't read arabic characters
body: <p>This function reads (document.doc) files.. But it turns arabic characters into english characters</p>
  
  <p>I want to make it read arabic characters , Or remove it at least.</p>
  
  <pre><code>    function word($filename){ 
  
  
      if(($fh = fopen($filename, 'r')) !== false ) { 
  
         $headers = fread($fh, 0xA00); 
         $n1 = ( ord($headers[0x21C]) - 1 ); 
         $n2 = ( ( ord($headers[0x21D]) - 8 ) * 256 ); 
         $n3 = ( ( ord($headers[0x21E]) * 256 ) * 256 ); 
         $n4 = ( ( ( ord($headers[0x21F]) * 256 ) * 256 ) * 256 ); 
         $textLength = ($n1 + $n2 + $n3 + $n4); 
         if($extracted_plaintext = @fread($fh, $textLength)){ 
  
         }else{ 
              return docx2text($filename); // Save this contents to file 
         } 
  
          $text=str_replace(  chr(13) , "\n", $extracted_plaintext); 
  
          echo $text; 
      } 
  
  
  } 
  
  word('filename.doc');  
  </code></pre>
  
  <p>E.X: filename.doc -> file contains statment "بسم الله الرحمن الرحيم"</p>