Mike Giddens
unread,Jan 3, 2009, 11:54:32 PM1/3/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Biodiversity Collections Index
I was playing with the csv file today and found that with this simple
test:
$handle = fopen("lookup_lsid.csv", "r");
while (($data = fgetcsv($handle, 5000, ",")) !== FALSE) {
print_r($data);
}
You will get corrupt data for certain reconrds that have a name
containing \"
It looks like there is some escaping going on but it is causing the
fgetcsv to escape the " and pushes things around.
A quick fix I used was to do a string replace \" => \ " on the file in
wordpad for now so that I could load the data. This should be an easy
fix and thought you could resolve this issue so that others don't face
the same issue.
I will be making another post in a day or so to show off something
cool ;)
Cheers,
Mike