summaryrefslogtreecommitdiffstats
path: root/ktnef
diff options
context:
space:
mode:
authorFabio Rossi <rossi.f@inwind.it>2018-11-26 17:26:21 +0100
committerFabio Rossi <rossi.f@inwind.it>2018-11-26 17:28:07 +0100
commit9fd3b6acfa7f8fc347f8678e969c7deeb3ab516b (patch)
tree4ecc43962557fb145b0115d8c2ec46d3172e455f /ktnef
parent74cbb937c7d08a77954e8b05dc6011ef04cb309e (diff)
downloadtdepim-9fd3b6acfa7f8fc347f8678e969c7deeb3ab516b.tar.gz
tdepim-9fd3b6acfa7f8fc347f8678e969c7deeb3ab516b.zip
Add unicode string support to the ktnef parser library
Signed-off-by: Fabio Rossi <rossi.f@inwind.it>
Diffstat (limited to 'ktnef')
-rw-r--r--ktnef/lib/ktnefparser.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/ktnef/lib/ktnefparser.cpp b/ktnef/lib/ktnefparser.cpp
index 3edd7b6ad..0b374afab 100644
--- a/ktnef/lib/ktnefparser.cpp
+++ b/ktnef/lib/ktnefparser.cpp
@@ -715,7 +715,17 @@ TQ_UINT16 readMAPIValue(TQDataStream& stream, MAPI_value& mapi)
}
break;
case MAPI_TYPE_USTRING:
- mapi.type = MAPI_TYPE_NONE;
+ // in case of a vector'ed value, the number of elements
+ // has already been read in the upper for-loop
+ if ( ISVECTOR( mapi ) )
+ d = 1;
+ else
+ stream >> d;
+ for (uint i=0;i<d;i++)
+ {
+ value.clear();
+ value.asString() = readMAPIString( stream, true );
+ }
break;
case MAPI_TYPE_OBJECT:
case MAPI_TYPE_BINARY:
@@ -741,6 +751,7 @@ TQ_UINT16 readMAPIValue(TQDataStream& stream, MAPI_value& mapi)
}
break;
default:
+ kdDebug().form( "unsupported type=%x\n", mapi.type );
mapi.type = MAPI_TYPE_NONE;
break;
}
@@ -844,6 +855,8 @@ bool KTNEFParser::readMAPIProperties( TQMap<int,KTNEFProperty*>& props, KTNEFAtt
kdDebug().form( "(tag=%04x) MAPI time%s: %s\n", mapi.tag, mapiname.ascii(), mapi.value.toString().ascii() );
break;
case MAPI_TYPE_USTRING:
+ kdDebug().form( "(tag=%04x) MAPI unicode string%s: size=%d \"%s\"\n", mapi.tag, mapiname.ascii(), mapi.value.toByteArray().size(), mapi.value.toString().ascii() );
+ break;
case MAPI_TYPE_STRING8:
kdDebug().form( "(tag=%04x) MAPI string%s: size=%d \"%s\"\n", mapi.tag, mapiname.ascii(), mapi.value.toByteArray().size(), mapi.value.toString().ascii() );
break;