Kcko
2/27/2014 - 3:35 PM

Convert UTF - win1250 - CSV

Convert UTF - win1250 - CSV

 <?php
 
 $out = iconv('utf-8', 'windows-1250//TRANSLIT', $out);
 
         
 $filename = 'katalog-export___' . date('YmdHis') . '.csv';
 header('Content-Encoding: windows-1250');
 header('Content-type: text/csv; charset=windows-1250');
 header('Content-Disposition: attachment; filename=' . $filename);
 //echo "\xEF\xBB\xBF"; // UTF-8 BOM
 echo $out;
 exit(0);
 
 ?>