#4 libical cannot show UTF-8 strings with icalparser_add_line()

open
nobody
None
5
2008-12-11
2008-12-11
Anonymous
No

libical cannot show UTF-8 strings with icalparser_add_line() because strstriplt() works for ASCII only.

To reproduce:
1. cat a.ics
BEGIN:VCALENDAR
PRODID:-//Ximian//NONSGML Evolution Calendar//EN
VERSION:2.0
METHOD:PUBLISH
BEGIN:VEVENT
SUMMARY: xxx multi-byte xxx
LOCATION: xxx multi-byte xxx
END:VEVENT
END:VCALENDAR

2. run program.

icalparser *parser = icalparser_new();
icalparser_set_gen_data(parser, fopen("a.ics", "r"));
line = icalparser_get_line(parser,read_stream);

Then the UTF-8 SUMMARY and LOCATION are always garbaged.
I'm attaching the patch.

Discussion

  • fujiwara
    fujiwara
    2008-12-11

    I forgot to log int the system.