Menu

#48 inproperly parse with non-ascii char.

open
nobody
None
5
2006-12-07
2006-12-07
LSimon
No

Hi, there,

I recently using the xls reader and got some problem for some values with non-ascii character, it may not be properly parsed into array. After looking though the code, I found this depend on the actual position of the data in the file, so that is pretty random.

To fix it, edit reader.php
inside the function _parse()

[code omitted]
$newstr = '';
for ($j = 0; $j < strlen($retstr); $j++) {
$newstr = $retstr[$j].chr(0);
}
$retstr = $newstr;
[code omitted]

change to line "$newstr = $retstr[$j].chr(0);"
to "$newstr .= $retstr[$j].chr(0);"

"=" to be ".="

and the problem should be fixed.

Discussion


Log in to post a comment.