Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save Kcko/9252443 to your computer and use it in GitHub Desktop.
Save Kcko/9252443 to your computer and use it in GitHub Desktop.
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);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment