Open GoogleCodeExporter opened 8 years ago
Which output encoding's used?
Original comment by draug...@gmail.com
on 13 Mar 2009 at 11:41
Hi
Have the same problem... € is "Detected an illegal character in input string"
!
I have just add a "echo $string;" on line 1715 and get this :
"au capital de 115 000 ¬ ,Siège social (...)
Notice: iconv() [function.iconv]: Detected an illegal character in input string
in
C:\Program Files\EasyPHP 3.0\www\excel_reader.php on line 1719"
where you can see that € is replaced by ¬
and :
" contrôle d emmanchement ## filtre
Notice: iconv() [function.iconv]: Detected an illegal character in input string
in
C:\Program Files\EasyPHP 3.0\www\excel_reader.php on line 1719"
where ' is replace by
Is seems as if something like a "str_replace" is mistaken on before calling the
iconv function for converting this special characters... (i also have pb with
the ... in Excel which is changed into a spécial character to ! pfff)
I'm looking for the array of special characters from Excel to be replace in the
$string.
Original comment by cmo.long...@orange.fr
on 27 Nov 2009 at 1:09
I forget to give this :
$data->setOutputEncoding('CP1251');
Original comment by cmo.long...@orange.fr
on 27 Nov 2009 at 1:10
[deleted comment]
[deleted comment]
[deleted comment]
The following solution is for the file "php-excel-reader-2.21.zip" :
(la solution suivante concerne le fichier "php-excel-reader-2.21.zip")
* A class for reading Microsoft Excel (97/2003) Spreadsheets.
*
* Version 2.21
*
* Enhanced and maintained by Matt Kruse < http://mattkruse.com >
* Maintained at http://code.google.com/p/php-excel-reader/
*
* Format parsing and MUCH more contributed by:
* Matt Roxburgh < http://www.roxburgh.me.uk >
*
* DOCUMENTATION
* =============
* http://code.google.com/p/php-excel-reader/wiki/Documentation
*
* CHANGE LOG
* ==========
* http://code.google.com/p/php-excel-reader/wiki/ChangeHistory
*
* DISCUSSION/SUPPORT
* ==================
* http://groups.google.com/group/php-excel-reader-discuss/topics
At the end of the file, you have to replace this code :
(A la fin du fichier, il faut remplacer le code suivant:)
function _encodeUTF16($string) {
$result = $string;
if ($this->_defaultEncoding){
switch ($this->_encoderFunction){
case 'iconv' : $result = iconv('UTF-16LE', this->_defaultEncoding, $string);
break;
case 'mb_convert_encoding' : $result = mb_convert_encoding($string,
$this->_defaultEncoding, 'UTF-16LE' );
break;
}
}
return $result;
By :
(par :)
function _encodeUTF16($string) {
$result = $string;
if ($this->_defaultEncoding){
switch ($this->_encoderFunction){
case 'iconv' : $result = iconv('UTF-16LE', this->_defaultEncoding, $string);
break;
case 'mb_convert_encoding' : $result = mb_convert_encoding($string,
$this->_defaultEncoding, 'UTF-8' );
break;
}
}
return $result;
That all !
(c'est tout !)
I'm waiting for the response of KEVIN L.
(j'attends la confirmation de KEVIN L.)
Original comment by cmo.long...@orange.fr
on 19 Apr 2010 at 5:45
Original issue reported on code.google.com by
derkge...@gmail.com
on 13 Mar 2009 at 9:38