I get a problem with symbols if i want to create a CSV. I get a  symbol. I think it is a space, but so as you can see i already added charset=UTF-8 to try to fix this problem.
$lines[] = array($product_sku, $product_name, $product_discount, $product_price, $product_quantity, $product_price_total);
header('Content-Encoding: UTF-8');
header("Content-type: text/csv; charset=UTF-8");
header('Content-Disposition: attachment; filename="filename";');
echo "\xEF\xBB\xBF";
$f = fopen('php://output', 'wb');
// First row
fputcsv($f, array('SKU', 'Productnaam', 'Discount', 'Prijs', 'Aantal', 'Totaal prijs'), $delimiter);
foreach ($lines as $line) {
fputcsv($f, $line, $delimiter);
}
// Close the file
fclose($f);