Hi I've got the following problem:
We use MS Exchange Server and Outlook 2013.
When I create a task in Outlook with a multiline description like this:
Some Test
Description
Then the debugger shows me, that this is "Some Test\r\nDescription" in reality.
When I call DavMail with a REPORT request for the description of this task I always get
"Some TestnDescription" as return value.
The problem is: in davmail.exchange.VProperty in the appendMultilineEncodedValue method.
There the description of "Some Test\r\nDescription" gets "Some Test\r\nDescription". \n isn't a NL anymore.
So the result of this would be:
Some Test
\nDescription
The class davmail.exchange.ICSBufferedReader however merges the two lines into one and skipps the "\" part. See the readLine method. The comment there says "workaround for broken items with \n as first line character" but this isn't very good, too. because "\n" will become "n". Leaving us with
"Some TestnDescription".
My solution to this issue:
Chage the appendMultilineEncodedValue method of the davmail.exchange.VProperty class to escape "\r" too:
if (c == '\n') {
buffer.append("\n");
} else if ( c == '\r') {
buffer.append("\r");
}
This will set the property to "Some Test\r\nDescription" which will cause a correct result value of
"Some Test\r\nDescription"
Damn it! All the double \ are missing... Why does sourceforge something like this -.-..
Second try:
The problem is: in davmail.exchange.VProperty in the appendMultilineEncodedValue method.
There the description of "Some Test\r\nDescription" gets "Some Test\r\\nDescription". \\n isn't a NL anymore.
So the result of this would be:
Some Test
\\nDescription
The class davmail.exchange.ICSBufferedReader however merges the two lines into one and skipps the "\\" part. See the readLine method. The comment there says "workaround for broken items with \n as first line character" but this isn't very good, too. because "\\n" will become "n". Leaving us with
"Some TestnDescription".
My solution to this issue:
Chage the appendMultilineEncodedValue method of the davmail.exchange.VProperty class to escape "\r" too:
if (c == '\n') {
buffer.append("\\n");
} else if ( c == '\r') {
buffer.append("\\r");
}
This will set the property to "Some Test\\r\\nDescription" which will cause a correct result value of
"Some Test\r\nDescription"
Last edit: Khaos 2015-08-17
Obsolete, please resubmit if this issue happens with latest release