From a038d3e8bbb29e40aac51c97f320a0fb7034d474 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Thu, 24 Feb 2011 21:29:44 +0000 Subject: [PATCH] Monotone-Parent: c33cbc477978136a5d59d29b8df81cdc54cffc70 Monotone-Revision: edc75cae9ade9eb49541479ea8ed489728d9bcc7 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2011-02-24T21:29:44 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 3 +++ OpenChange/MAPIStoreTypes.m | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 6bc0f79e4..6825eeec6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2011-02-24 Wolfgang Sourdeau + * OpenChange/MAPIStoreTypes.m (NSObjectFromStreamData): convert + read PT_UNICODE stream data as UTF-16. + * OpenChange/MAPIStoreContext.m (-setProperty:withFMID:ofTableType:fromFile:): considering the cached message as a MAPIStoreMessage instance instead of NSDictionary. diff --git a/OpenChange/MAPIStoreTypes.m b/OpenChange/MAPIStoreTypes.m index 98c56dc9c..a4d35c024 100644 --- a/OpenChange/MAPIStoreTypes.m +++ b/OpenChange/MAPIStoreTypes.m @@ -214,7 +214,8 @@ id NSObjectFromStreamData (enum MAPITAGS property, NSData* streamData) { case PT_UNICODE: case PT_STRING8: - result = [NSString stringWithUTF8String: [streamData bytes]]; + result = [NSString stringWithCharacters: (unichar *) [streamData bytes] + length: [streamData length] / 2]; break; case PT_BINARY: result = streamData;