Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

excel-reader utf problem

Tags:

php

phpexcel

Can you help me with problem writtent below:

I am getting error iconv() [function.iconv]: Detected an illegal character in input string when i am reading xls file and converting it into csv. I am using php-excel-library and i get this error in line:

case 'iconv' :    
     $result = iconv('UTF-16LE', $this->_defaultEncoding, $string);
break;

Does enybody know how to fix it?

like image 316
Gasper Avatar asked Nov 04 '22 18:11

Gasper


1 Answers

It means that in your file is a bit-sequence that cannot be mapped onto a char, b/c it's meaningless, and therefore not be converted to another encoding.

Use the //IGNORE-flag as descriped here.

like image 55
Raffael Avatar answered Nov 15 '22 13:11

Raffael