From 6697c0bf7c3caae1886c891dd99129402ed97311 Mon Sep 17 00:00:00 2001 From: Fabio Rossi Date: Mon, 26 Nov 2018 17:26:21 +0100 Subject: Add unicode string support to the ktnef parser library Signed-off-by: Fabio Rossi (cherry picked from commit 9fd3b6acfa7f8fc347f8678e969c7deeb3ab516b) --- ktnef/lib/ktnefparser.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'ktnef/lib') 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& 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; -- cgit v1.2.1