From owner-freebsd-ports@FreeBSD.ORG Sat Apr 10 05:17:49 2004 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CB52316A4CE; Sat, 10 Apr 2004 05:17:49 -0700 (PDT) Received: from mail2.bluewin.ch (mail2.bluewin.ch [195.186.4.73]) by mx1.FreeBSD.org (Postfix) with ESMTP id 686A143D1D; Sat, 10 Apr 2004 05:17:49 -0700 (PDT) (envelope-from pfm@bluewin.ch) Received: from gandalf (83.77.56.247) by mail2.bluewin.ch (Bluewin AG 7.0.027) id 40559C2000415F36; Sat, 10 Apr 2004 12:17:48 +0000 From: "Markus Pfister" To: Date: Sat, 10 Apr 2004 15:19:11 +0200 Message-ID: <000001c41efe$69f46f90$9101a8c0@gandalf> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.4024 Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 cc: ports@FreeBSD.org Subject: FreeBSD Port: php4-4.3.5: fgetcvs problem with "\n" in delimited data X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Apr 2004 12:17:49 -0000 Hi Ale, If I sent this mail to the wrong (not in charge) person, please apologize. The folks running our webserver run the php4 4.3.5 FreeBSD port from the http://www.freshports.org/lang/php4 site. Consider the following code: $num fields in line $row:
\n"; $row++; for ($c=0; $c < $num; $c++) { echo nl2br($data[$c]) . "
\n"; } } fclose($fp); } ?> Problem description: It seems, that former versions of fgetcsv was able to parse delimited data fields containing line breaks (\n), where the 4.3.5 version (see http://www.kim-dojo.ch/php/kisgb/ck98.php for detailed information) "forgets" that data. Sample code output: This code produces on a Linux box with php 4.3.1 or 4.3.5 installed: Content-type: text/html X-Powered-By: PHP/4.3.1

2 fields in line 1:
one
a
line
with
linebreaks

On a FreeBSD System with php 4.3.5 installed the output is:

2 fields in line 1:
one

Could someone try to reproduce the described behaviour and let me know if my observations are correct or if I simply did something wrong. Regards Markus Pfister Visit http://www.kim-dojo.ch