Added charset header and BOM to utf-8 csv exports

This commit is contained in:
Frank Schubert
2024-11-05 13:53:50 +01:00
parent ed95e9bb7c
commit 1f3ef5246f
8 changed files with 15 additions and 15 deletions
@@ -1,9 +1,9 @@
<?php
ob_end_flush();
header("Content-type: text/csv");
header("Content-type: text/csv; charset=utf-8");
header('Content-disposition: attachment; filename="ivtproducts-active-'.date('Y-m-d_H-i-s').'.csv"');
?>
IVT ID;Typ;Produkt;Standardpreis;Anzahl Kunden;Kunde
<?="\u{FEFF}"?>IVT ID;Typ;Produkt;Standardpreis;Anzahl Kunden;Kunde
<?php
$types = array('-----', 'xDSL', 'FTTH', 'FTTB', 'DOCSIS', 'Funk', 'Telefon', 'Webhosting', 'Carrier', 'Housing', 'TV');
foreach($products as $product_id => $product):