[sync] Horde::Data vs iCalendar package
Jan Schneider
jan at horde.org
Thu Jul 1 01:59:43 PDT 2004
Zitat von Karsten Fourmont <fourmont at gmx.de>:
> Even if inline specification of charsets is no longer according to spec,
> horde should accept it in imports. Phones are sending it that way. Well: at
> least my phone does :-)
>
>
> The charset handling code of Horde::Data/imc.php missing in iCalendar is:
>
> function read($attribute, $index = 0)
> {
> $value = $attribute['values'][$index];
>
> if (isset($attribute['params']['ENCODING'])) {
> switch ($attribute['params']['ENCODING'][0]) {
> case 'QUOTED-PRINTABLE':
> $value = quoted_printable_decode($value);
> break;
> }
> }
>
> if (isset($attribute['params']['QUOTED-PRINTABLE']) &&
> ($attribute['params']['QUOTED-PRINTABLE'] == true)) {
> $value = quoted_printable_decode($value);
> }
>
> if (isset($attribute['params']['CHARSET'])) {
> $value = String::convertCharset($value,
> $attribute['params']['CHARSET'][0]);
> } else {
> // As per RFC 2279, assume UTF8 if we don't have an
> // explicit charset parameter.
> $value = String::convertCharset($value, 'utf-8');
> }
>
> return $value;
> }
>
>
> It relies on attribute being parsed for params. Im not sure if this is done
> in iCalendar already. The inline params look like this:
>
> BEGIN:VNOTE
> VERSION:1.1
> BODY;ENCODING=QUOTED-PRINTABLE:Here_comes_a_space:=20Did_you_get_it?
> END:VNOTE
This example still doesn't contain charset information, only encoding
information. How does such an iCal object look like if it contains umlauts
for example?
Jan.
--
Do you need professional PHP or Horde consulting?
http://horde.org/consulting.php
More information about the sync
mailing list