Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.32.0

Bug #639 bug when vCard contains notes
Submitted: 2004-01-28 23:34 UTC
From: chorton at inlandpac dot com Assigned:
Status: Bogus Package: Contact_Vcard_Parse
PHP Version: 4.3.0 OS: Linux
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 43 + 49 = ?

 
 [2004-01-28 23:34 UTC] chorton at inlandpac dot com
Description: ------------ The NOTES parsing seems to be quite buggy. I am not sure if it is the line breaks, or just the way the engine looks for the vCard fields. BEGIN:VCARD VERSION:2.1 N:Horton;Chad FN:Chad Horton NICKNAME:PHP-Vyper ORG:Insight Enterprises, Inc.;EBusiness TITLE:Developer Lead, eCommerce NOTE;ENCODING=QUOTED-PRINTABLE:Test1:=0D=0AThis is test 1=0D=0A=0D=0ATest2:=0D=0AThis is test 2=0D=0A=0D= =0ATest3:=0D=0AThis is test 3=0D=0A=0D=0A <<Chad Horton's Birthday>> <<Chad= Horton's Anniversary>> =0D=0A TEL;WORK;VOICE:(480) 333-3000 x3157 TEL;WORK;FAX:(480) 760-9632 ADR;HOME:;;10027 S 51st St;Phoenix;AZ;85044-5219;United States of America LABEL;HOME;ENCODING=QUOTED-PRINTABLE:10027 S 51st St=0D=0APhoenix, AZ 85044-5219=0D=0AUnited States of America URL;WORK:http://www.insight.com BDAY:19721214 EMAIL;PREF;INTERNET:chorton@Insight.com REV:20040128T232432Z END:VCARD Reproduce code: --------------- <?php // include the class file require_once 'Contact_Vcard_Parse.php'; // instantiate a parser object $parse = new Contact_Vcard_Parse(); // parse a vCard file and store the data // in $cardinfo $cardinfo = $parse->fromFile('Chad Horton.vcf'); // view the card info array echo '<pre>'; print_r($cardinfo); echo '</pre>'; ?> Expected result: ---------------- [NOTE] => Array ( [0] => Array ( [param] => Array ( [ENCODING] => Array ( [0] => QUOTED-PRINTABLE ) ) [value] => Array ( [0] => Array ( [0] => Test1: This is test 1 Test2: This is test 2 Test3: This is test 3 ) ) ) ) Actual result: -------------- [NOTE] => Array ( [0] => Array ( [param] => Array ( [ENCODING] => Array ( [0] => QUOTED-PRINTABLE ) ) [value] => Array ( [0] => Array ( [0] => Test1: This is test 1 Test2: This is test 2 ) ) ) ) [=0ATest3] => Array ( [0] => Array ( [param] => Array ( ) [value] => Array ( [0] => Array ( [0] => =0D=0AThis is test 3=0D=0A=0D=0A <> <> =0D=0A ) ) ) )

Comments

 [2004-01-28 23:43 UTC] pmjones
Thank you for taking the time to write to us, but this is not a bug. This is the expected behavior. RFC 2425 of the vCard spec states that, where the field data spans more than one line, the second and subsequent lines shall start with a single whitespace character (space or tab). The example data shows that the NOTES field, although it spans multiple lines, does not prefix the continuing lines with a whitespace character. For more information and line folding and wrapping, please see RFC 2425 section 5.8.1, "Line delimiting and folding." http://www.ietf.org/rfc/rfc2425.txt