Re: Turba contact photos not synced with Synthesis client
Thomas Trethan <[email protected]>
| Newsgroups | gmane.comp.horde.sync |
|---|---|
| Message-ID | <[email protected]> |
Quoting Jan Schneider <[email protected]> > > Zitat von Thomas Trethan <[email protected]>: > >> >> >> After doing a lot of tests together with the Synthesis crew they >> sent me the following explanation: >> >> 1) The Horde devInf is wrong. The correct type name is text/vcard, >> as sent with the items (which have the correct type). But the >> devInf shows text/directory, which is not correct. >> (our client ignores that, this is not the main reason for the problem) >> >> 2) We decoded the sent photo information. All the sent photos are >> completely corrupted and can't be displayed therefore. It looks like >> a wrong conversion from ANSI to UTF-8, e.g. the type is something >> like JFIF (not JPEG). So the server sends complete garbage within >> the photo field. >> >> A real JPG starts with: >> >> FF D8 DD E0 00 10 4A >> >> What we get is: >> >> C3 BF C3 98 C3 BF C3 A0 00 10 4A >> >> The starting C3 BF is simply FF in UTF-8. >> >> Regards, Tom >> Quoting [email protected]: >> >>> Since Turba is sending the photo back to the client, it's got to be a >>> client issue. Can you verify that the PHOTO attribute looks the same >>> in both sync directions? >>> >>> Jan. >> >> -- >> sync mailing list - Join the hunt: http://horde.org/bounties/#sync >> Frequently Asked Questions: http://horde.org/faq/ >> To unsubscribe, mail: [email protected] >> > > > Please create a ticket on http://bugs.horde.org/. > > Jan. > I created a ticket http://bugs.horde.org/ticket/9100 I finally found the reason for this behaviour and managed to implement a hack for solving it. The reason is, that all turba data is encoded utf-8 in the function tovCard() in lib/Driver.php. Photo and logo data should not be encoded, therefore I added the following code in line 1280 before the data gets base64 encoded: $val = utf8_decode($val); I know this is just a quick hack, but it works. Hopefully someday someone will implement a better solution. Since I'm not familiar with the Horde developement process (CVS, GIT, ...) yet maybe someone could add this line of code to the source meanwhile, thanks. Regards, Tom -- sync mailing list - Join the hunt: http://horde.org/bounties/#sync Frequently Asked Questions: http://horde.org/faq/ To unsubscribe, mail: [email protected]