Euro symbol

Topics: Developer Forum
Jul 2, 2008 at 11:20 AM
Hello everybody,

I'm creating Excel files "on-the-fly" using the Excel5 writer, saving the output to "php://output" stream. All it's working fine, but I would like to use the Euro symbol (the one coded "€" in HTML) instead of the "EUR" string appearing with "PHPExcel_Style_NumberFormat::FORMAT_CURRENCY_EUR_SIMPLE" constant.

If I try to use the formatting string '[$€ ]#,##.00_-' (so, replacing the EUR string with the euro symbol), I get the following error:

Notice:  iconv(): Detected an illegal character in input string in C:\Programmi\Apache Software Foundation\Apache2.2\htdocs\PHPExcel161\Classes\PHPExcel\Writer\Excel5.php on line163

This this the line 163 of Excel5.php file:

'NumFormat' => iconv("UTF-8", "Windows-1252", $style->getNumberFormat()->getFormatCode())

So, it seems that the problem is in the UTF-8 that cannot accept the euro symbol.

Can anyone help me with this issue?

Oct 5, 2008 at 10:26 PM
Update: Fixed per work item #7737