Issue in exporting data in other than english language in php codeigniter

This is the exported file data ooks like even when I have data in array in hindi language

Screenshot_80

how can I display the data in language that I am getting in array ?

This is how I have placed the headers whicle expoerting

         $delimiter = ",";
      $output = fopen('php://memory', 'w');  
        fprintf( $output, "\xEF\xBB\xBF");

       foreach ($csv_data as $value) {
        $myData = array($value['mydata'],$value['mydata1'],$value['mydata2'],$value['mydata3'],$value['mydata4'],$value['mydata5']);
        $array_trim = array_map("trim", $myData);
          
          fputcsv($output, $array_trim,$delimiter);
          fwrite($output, "\t");
    }
     fseek($output, 0);     
    header('Content-Type: text/csv');
    header('Content-Disposition: attachment; filename="' . $fileName . '";');      

    fpassthru($output);

How can I fix it , Please guide me ?

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.