CodePage 21010

Topics: Developer Forum
Nov 11, 2012 at 2:38 PM

I am dealing with xls files for which the codepage from PHPExcel, is 21010.

These files are made by unknown software server-side.

This codepage is unknown by PHPExcel and accordingly raises an exception.
The cookie-cutter solution is to add a "case" in the PHPEcel_Shared_CodePage::NumberToName function, returning "CP1252", files are thus handled smoothly by PHPExcel.
But a solution that would avoid tinkering PHPExcel source would be better...

Did I miss a function which allows to impose the codepage to use?
Nov 18, 2012 at 3:02 PM

There is no function that will allow PHPExcel to override the list of valid codepages recognised by PHPExcel that can be converted to UTF-8 by PHP. I can't find any reference to a value of 21010 in the Excel documentation. For the moment, your cookie-cutter solution is the best option

Nov 21, 2012 at 11:04 AM

Ok. Thank you for taking the time to reply, Mark.