[Standards-JIG] JEP-0153 implementation experience
wolf at bluehands.de
Tue Sep 13 09:03:56 CDT 2005
While implementing JEP-0153 (VCard-PHOTO) for LLuna, I came across interesting and funny implementations. Maybe this helps other developers.
Things which happen to a small client in a big world are:
- Base64 data may be wrapped to < 80 characters per line. This is probably not the fault of the clients, but the fault of the MIME libs they use. Not exactly as in the JEP. Yes, MIME Email wraps base64 strings, but nobody said that this is valid for VCard-PHOTO.
- Some clients put "image" into the type, which should be a MIME-type. Very helpful. "None" has also been observed. Also "image/binary", thank you.
- Even if the type is correct, some clients manage to put the wrong type calling a JPEG "image/png". Maybe the user put a wrong filename extension and the client derived the type from that. How do you convert a JPEG into a PNG? Just rename it. So, do not trust the supplied TYPE element. It may lie.
- Image sizes sometimes exceed the 8 KB restriction. This is no surprise, because implementations predate JEP-0153.
- There are implementations where the base64 data is not the text of a BINVAL element, but the text of the PHOTO element directly. The PHOTO element has no sub-elements in this case and the type comes as an attribute of PHOTO (mime-type='').
Dr. Heiner Wolf
bluehands GmbH & Co.mmunication KG
+49 (0721) 16108 75
Jabber enabled Virtual Presence on the Web: www.lluna.de
Open Source Future History: www.galactic-developments.de
More information about the Standards-JIG