Menu

#1 Reading full contents of non-ASCII data

open
nobody
None
5
2008-08-31
2008-08-31
No

Only the last part of each cell is read by ods->parse(). If there is no non-ASCII data in the cell, everything is fine but if there is non-ASCII data, only the last part begining with the last non-ASCII char is read.

This happens because xml_set_character_data_handler can be called several times for the same cell when it contains non-ASCII data as per <http://www.php.net/xml_set_character_data_handler>.

I believe the attached patch is the proper fix for this issue.

To verify this issue create an .ods file with the following content in a cell: descrição

Try to read this file with and without the patch to see that only with this patch you will get the full text on the parsed ods object.

Discussion

  • Rodrigo Severo

    Rodrigo Severo - 2008-08-31

    Fixes partial read of non-ASCII data.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.