[dev] [commits] Horde branch master updated. 76152d6a2976549c96ae0aec5b20c4669b8a68bf

Michael M Slusarz slusarz at horde.org
Tue Nov 16 17:45:25 UTC 2010


Corrected:

> This pseudocode demonstrates how Horde_Prefs works now:
>
> =====
>
> $data = array('août');
>
> // Serialize in app code
> $a = serialize($data);
>
> // Call $prefs->setValue($a):
> $a = Horde_String::convertCharset($a, 'UTF-8', 'ISO-8859-1');
>
> // $a stored in backend
>
> // ...
>
> // Retrieve in backend.
> $b = $a;
>
> // Call $prefs->getValue($a);
> $b = Horde_String::convertCharset($b, 'ISO-8859-1', 'UTF-8');
>
> // Unserialize in app code
> $b = unserialize($b);
>
> if ($b == $data) {
>     print "SAME";
> }
>
> // prints "SAME"
>
> =====


-- 
___________________________________
Michael Slusarz [slusarz at horde.org]




More information about the dev mailing list