-
Notifications
You must be signed in to change notification settings - Fork 231
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some events cannot be parsed after upgrading to 4.0.1 #337
Comments
In the future, could you provide the full ics text? |
I can't repro your problem. This test passes: public void TestDescription()
{
const string testCase = @"BEGIN:VCALENDAR
PRODID:-//github.com/rianjs/ical.net//NONSGML ical.net 4.0//EN
VERSION:4.0
BEGIN:VEVENT
DTEND:20171117T114135
DTSTAMP:20171117T154135Z
DTSTART:20171117T104135
DESCRIPTION:aaa aaaaa:\n aaaaa aaaa aaaaa aaaaaaa (aaaaa\, aaaa\, aaaaa\, TP) aaa aaa aaaaa aaaa\;\n aaa aaaaa aaaa aaaa aaaa aaaaa aaaaaa aaaaaa (aa aaaaaa\, aaaaaaa)\;\n aaaaa aaaaaa aaa aaa aaaaa aaaaaa aa\, aaaaaa aaaaaa\, aaa.\;\n\naaaa aaaa aaaaa aaa aa aaa aaa aaaaa aaaaaa aa aaa aaaa aaaaa`a aaaaa aaa.
SEQUENCE:0
UID:46ee3437-cb6f-40f7-8a7a-49b177908396
END:VEVENT
END:VCALENDAR";
var deserialized = Calendar.Load(testCase);
var e = deserialized.Events.First();
Assert.AreEqual(new CalDateTime(2017,11,17,10,41,35), e.Start);
Assert.AreEqual(new CalDateTime(2017,11,17,11,41,35), e.End);
Assert.AreEqual("aaa aaaaa:\n aaaaa aaaa aaaaa aaaaaaa (aaaaa, aaaa, aaaaa, TP) aaa aaa aaaaa aaaa;\n aaa aaaaa aaaa aaaa aaaa aaaaa aaaaaa aaaaaa (aa aaaaaa, aaaaaaa);\n aaaaa aaaaaa aaa aaa aaaaa aaaaaa aa, aaaaaa aaaaaa, aaa.;\n\naaaa aaaa aaaaa aaa aa aaa aaa aaaaa aaaaaa aa aaa aaaa aaaaa`a aaaaa aaa. ", e.Description);
} Whitespace matters in ical text, so your stack trace is insufficient. If you have some ics text, I can try again. |
Hello @rianjs, I'm still having the same issue. Below is the content from the
I think it might actually be related to having unicode bullets ( Thank you. |
The unicode bullets and apostrophes are fine. It's actually the hidden tabs ( With respect to serialization, this falls under the Content Line rules. The code that implements that section is in
|
Thanks for the detailed answer, @rianjs. Unfortunately, the calendar is being taken from Atlassian Confluence, so I have no control on how people are formatting event contents there. The only option, though, could be to edit the stream contents before passing it to your library, but that, I guess, would put some extra overhead. If there's no way to resolve this, I will probably going to stick with 3.0.15, which works fine even with the incorrect chars. |
It's up to you. I would recommend normalizing the stream before funneling it to ical.net if you can. 3.0.15 is the end of the line for v3, it won't get receive any more updates because it can't. (Under the hood, v3 and v4 are radically different from a deserialization perspective: v3 used ANTLR; v4 doesn't.) I guess I'd start with a no-op abstraction between the two. Some |
I just talked to @chescock, and he thinks it's a bug, so one of us will fix it, and I'll update the thread with a nuget version that you can find it in. Basically, the regex character range doesn't extend to tabs, but should, because it's considered |
It is good to hear that and I will be looking forward for the new release. Thanks! |
Fixed in 4.0.3: |
I've just upgraded to the latest Nuget and there are indeed NO issues. Thank you, @rianjs! |
Excellent! |
…ake sure NetStandard DLLs are playing nicely together #337
…ake sure NetStandard DLLs are playing nicely together #337
Hello,
I have been using 3.0.15 version for some time and it was able to parse a calendar from stream just fine. Anyhow, after upgrading to the most recent 4.0.1 version, parsing of the same calendar is failing on some specific event:
The stack trace include the line it it seems to be failing on, but I have replaced the actual text with
a
letters, leaving all the formatting and symbols as is.I would guess it has something to do with the large number of new lines or the apostrophe symbol.
Reverting back to 3.0.15 version solves the issue.
Thanks in advance.
The text was updated successfully, but these errors were encountered: