Menu

Does ical4j support chinese characters in version 1.0.6 ?

2017-05-22
2017-05-23
  • Ziegenhagen

    Ziegenhagen - 2017-05-22

    Problem, a customer uses a mandarin sign in this calendar item description. That somehow not only goes away during processing but also messes up the next item of the calendar, the endtime.
    outlook:
    DESCRIPTION:不\n
    DTEND;TZID="China Standard Time":20170515T163000

    after processing with ical4j
    DESCRIPTION:
    \N:DTEND\;TZID="China Standard Time":20170515T163000

    Is this a somehow known issue which could maybe go away with a newer version of ical4j?

    Or can I avoid this with another construction?
    Currently
    iCal = new CalendarBuilder().build(new ByteArrayInputStream(calendarData));

    Thanks a lot!

     
  • Alexander Klimetschek

    You probably need to pass the right encoding in which that ics file or stream data is, by using the Reader variant of build() and wrapping the bytearrayinputstream with an InputStreamReader where you set the charset/encoding as 2nd argument.

     
  • Ziegenhagen

    Ziegenhagen - 2017-06-01

    Thank you very much, I will give it a try!

     

Log in to post a comment.