[#6539] Handling missing ENCODING parameter in iCal date
Summary Handling missing ENCODING parameter in iCal date
Queue Horde Framework Packages
Queue Version HEAD
Type Bug
State Resolved
Priority 1. Low
Owners Jan Schneider <jan (at) horde (dot) org>
Requester Gunnar Wrobel <p (at) rdus (dot) de>
Created 03/29/2008 (237 days ago)
Due
Updated 04/04/2008 (231 days ago)
Assigned 03/30/2008 (236 days ago)
Resolved 04/04/2008 (231 days ago)
Attachments HK-GW-iCal_no_ENCODING.patch Download
Milestone 3.2
Patch No

History
04/04/2008 Jan Schneider Comment #3
State ⇒ Resolved
Taken from Horde DevelopersHorde Developers
Reply to this comment
Committed, thanks. This behavior is following the specs btw, at least 
for vCard objects.
04/04/2008 Jan Schneider Milestone ⇒ 3.2
Assigned to Jan Schneider
 
03/30/2008 Chuck Hagenbuch Comment #2
State ⇒ Assigned
Assigned to Horde DevelopersHorde Developers
Reply to this comment
Looks okay to me - Jan?
03/29/2008 Gunnar Wrobel Comment #1
New Attachment: HK-GW-iCal_no_ENCODING.patch Download
Patch ⇒
Milestone ⇒
Queue ⇒ Horde Framework Packages
Summary ⇒ Handling missing ENCODING parameter in iCal date
Type ⇒ Bug
Priority ⇒ 1. Low
State ⇒ Unconfirmed
Reply to this comment
iCalendar.php unfolds QUOTED-PRINTABLE encoded lines before parsing them.

The parameter ENCODING=QUOTED-PRINTABLE is expected in these lines.

A blackberry with SyncJe delivers lines like this during a SyncML run:

N;QUOTED-PRINTABLE;CHARSET=UTF-8:Euro=E2=82=AC;Lars=E2=82=AC

ENCODING= is missing here. From the format specs I guess the client is broken.

But iCalendar.php seems to support such broken clients:

                 if ((isset($params['ENCODING'])
                      && String::upper($params['ENCODING']) == 
'QUOTED-PRINTABLE')
                     || isset($params['QUOTED-PRINTABLE'])) {

                     $value = quoted_printable_decode($value);

isset($params['QUOTED-PRINTABLE']) allows to specify QUOTED-PRINTABLE 
as parameter without the leading ENCODING.

If iCalendar.php should support this then I'd suggest to apply the 
attached patch to correct unfolding.