Question

I´m having trouble with the output to a csv file with the euro sign. i´ve tried using € which doesn´t work and the &euro which also doesn´t work. This only works in my table view but not when exported to csv.

Hopes someone could help me out.

UPDATE: I forgot to say that what shows instead of the eurosign is this symbol: Â

'€ '
Was it helpful?

Solution

Old thread but I am answering it anyway for anyone finding this thread via a search engine.

What really worked for me is the following conversion:

echo iconv("UTF-8", "CP1252", $csv);

No encoding headers oder other conversions needed, just use the Symbol "€". This has been working since Office 2000 or earlier and still works with Office 2016/365.

OTHER TIPS

I personally would run a utf8 encoding function on the file

Example

mb_convert_encoding($csv, 'UTF-16LE', 'UTF-8');
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top