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

View File

@@ -674,7 +674,7 @@ class InvoiceController extends mfBaseController {
$type = "credit";
}
$csv_header = "satzart;konto;gkonto;belegnr;belegdatum;buchsymbol;buchcode;prozent;steuercode;betrag;steuer;text;kost;";
$csv_header = "\u{FEFF}satzart;konto;gkonto;belegnr;belegdatum;buchsymbol;buchcode;prozent;steuercode;betrag;steuer;text;kost;";
if($type == "credit") {
$csv_header .= "extbelegnr";
@@ -822,7 +822,7 @@ class InvoiceController extends mfBaseController {
/*$this->layout()->setFlash("Export erfolgreich abgeschlossen", "success");
$this->redirect("Invoice");*/
header("Content-type: text/csv");
header("Content-type: text/csv; charset=utf-8");
if($type == "credit") {
header('Content-disposition: attachment; filename="tt-prov-export-bmd-'.date('Y-m-d_H-i-s').'.csv"');
} else {