--- /dev/null
+BEGIN:VCARD
+VERSION:2.1
+N:Kontact;Outlook
+FN:Outlook Kontact
+NICKNAME:Nickname
+ORG:OutlookCompany;abteilung
+TITLE:OutlookPosition
+NOTE;ENCODING=QUOTED-PRINTABLE:Kommentar=0D=0A=0D=0A
+TEL;WORK;VOICE:busiphone
+TEL;HOME;VOICE:privphone
+TEL;CELL;VOICE:mobile
+TEL;WORK;FAX:faxbusi
+ADR;WORK:;office;street;City;State;12345;Germany
+LABEL;WORK;ENCODING=QUOTED-PRINTABLE:office=0D=0Astreet=0D=0ACity, State 12345=0D=0AGermany
+URL;WORK:http://www.opengroupware.org
+ROLE:profession
+BDAY:20050624
+EMAIL;PREF;INTERNET:outlook@ogo.com
+FBURL;ENCODING=QUOTED-PRINTABLE:???????y=04=04A=08?=FB?=FBA?
+REV:20050602T135331Z
+END:VCARD
+
+2005-06-02 Helge Hess <helge.hess@skyrix.com>
+
+ * VSSaxDriver.m: transparently decode property values if
+ ENCODING=QUOTED-PRINTABLE is set as an attribute (used by Outlook
+ vCards, needs testing against umlauts/charsets) (v4.5.16)
+
2005-05-06 Helge Hess <helge.hess@opengroupware.org>
* VSSaxDriver.m: more reorganisations, added support for groupings
#include "VSSaxDriver.h"
#include "VSStringFormatter.h"
#include <SaxObjC/SaxException.h>
+#include <NGExtensions/NGQuotedPrintableCoding.h>
#include "common.h"
@interface VSSaxTag : NSObject
- (id)initWithContentString:(NSString *)_data;
- (NSString *)tagName;
+- (NSString *)group;
- (BOOL)isStartTag;
- (BOOL)isEndTag;
- (BOOL)isTag;
[self _endComponent:tagName value:tagValue];
}
else {
+ // TODO: make this more generic, this one is used with Outlook vCards
+ if ([tagAttributes containsObject:@"ENCODING=QUOTED-PRINTABLE"]) {
+ // TODO: QP is charset specific! The one below decodes in Unicode!
+ tagValue = [tagValue stringByDecodingQuotedPrintable];
+ [tagAttributes removeObject:@"ENCODING=QUOTED-PRINTABLE"];
+ }
+
[self _reportContentAsTag:[self _mapTagName:tagName]
group:[self _groupFromTagName:tagName]
- withAttrs:[self _mapAttrs:tagAttributes forTag:tagName]
+ withAttrs:[self _mapAttrs:tagAttributes forTag:tagName]
andContent:tagValue];
}
#include "VSvCardSaxDriver.h"
#include "common.h"
+#define XMLNS_VSvCard \
+ @"http://www.ietf.org/internet-drafts/draft-dawson-vcard-xml-dtd-03.txt"
+
@implementation VSvCardSaxDriver
static NSSet *defElementNames = nil;
- (id)init {
if ((self = [super init]) != nil) {
- [self setPrefixURI:
- @"http://www.ietf.org/internet-drafts/draft-dawson-vcard-xml-dtd-03.txt"];
+ [self setPrefixURI:XMLNS_VSvCard];
[self setElementMapping:[[self class] xcardMapping]];
[self setAttributeElements:defElementNames];
[self _setVCardAttributeMappings];
# Version file
-SUBMINOR_VERSION:=15
+SUBMINOR_VERSION:=16