Hi,
The printDataLine function defined on line 435 of includes/ical.php uses substr and strlen functions. I noticed that this can cause issues with multibyte characters: in some cases, the substr can split a multibyte character, which can keep the client application from reading the output.
Replacing calls to substr and strlen with mb_substr and mb_strlen respectively would avoid splitting multibyte characters, but lines would then be 75 characters long instead of 75 bytes long, and the iCalendar standard requires lines to be 75 bytes long.
Thank you for your consideration.
Hi,
The
printDataLinefunction defined on line 435 ofincludes/ical.phpusessubstrandstrlenfunctions. I noticed that this can cause issues with multibyte characters: in some cases, thesubstrcan split a multibyte character, which can keep the client application from reading the output.Replacing calls to
substrandstrlenwithmb_substrandmb_strlenrespectively would avoid splitting multibyte characters, but lines would then be 75 characters long instead of 75 bytes long, and the iCalendar standard requires lines to be 75 bytes long.Thank you for your consideration.