FAQ
Edit report at http://pear.php.net/bugs/bug.php?id=12485&edit=1

ID: 12485
Updated by: [email protected]
Reported By: tuupola at appelsiini dot net
Summary: Triple quotes handled incorrectly
Status: Feedback
Type: Bug
Package: File_CSV
Operating System: OSX
PHP Version: 5.2.0
Assigned To: dufuz
Roadmap Versions:
New Comment:

I just tried parsing this CSV file:

"12","14","15"
"16"" ","18""","19"

It worked like a charm.

Gives me:

12
14
15
16"
18"
19

The 16" has the space behind it (because it has a space within the
quotes.)

I can't seem to be able to reproduce it. A proper example would be nice
as it could
have been affected by some other combination of factors.


Previous Comments:
------------------------------------------------------------------------

[2009-03-12 23:09:23] dufuz

-Status: Assigned
+Status: Feedback

We are unable to reproduce the bug as reported.
Please provide a simple script (10 lines or less)
or a link to an external script that can be used
to reproduce the bug.

If you can provide the script, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PEAR.

------------------------------------------------------------------------

[2008-01-05 19:00:44] dufuz

Could you give me an example CSV so that I can make a test case ? We
tried to account for a lot of the silly stuff, like a " is escaped with
a " and combine that with using " around each value, hellish.

Have you tried changing the delim to something else just to see how
that works out ?

------------------------------------------------------------------------

[2007-12-03 12:12:40] xenodave

I see the OS on this bug is tagged "OSX". Happens on Linux as well.

Linux 2.6.9-55ELsmp
PHP 5.2.1
PEAR File-1.3.0
CSV.php,v 1.41 2007/05/20 12:25:14 dufuz

------------------------------------------------------------------------

[2007-11-20 08:00:17] tuupola

Description:
------------
If csv file contains triple quoted value it is not handled properly.
File_CSV seems to think current value lasts until next triple quoted
value is discovered.

For example string value 18" becomes "18""" when exporting Excel to
csv. File_CSV chokes on this. Manually changing triple quoted values tom
something like "18"" " fixes problem.

------------------------------------------------------------------------

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedApr 29, '10 at 1:59a
activeApr 29, '10 at 1:59a
posts1
users1
websitepear.php.net

1 user in discussion

Helgith: 1 post

People

Translate

site design / logo © 2023 Grokbase