From 732761748dcba637fb2048af19a068e9123b7336 Mon Sep 17 00:00:00 2001 From: Mathieu Lutfy Date: Mon, 20 Jun 2022 11:35:18 -0400 Subject: [PATCH] dev/core#1541 Fix ICalendar random invalid utf8 --- CRM/Utils/ICalendar.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CRM/Utils/ICalendar.php b/CRM/Utils/ICalendar.php index 7d77ef07a1..b23f24f3c1 100644 --- a/CRM/Utils/ICalendar.php +++ b/CRM/Utils/ICalendar.php @@ -38,7 +38,7 @@ class CRM_Utils_ICalendar { $text = str_replace(',', '\,', $text); $text = str_replace(';', '\;', $text); $text = str_replace(["\r\n", "\n", "\r"], "\\n ", $text); - $text = implode("\n ", str_split($text, 50)); + $text = implode("\n ", mb_str_split($text, 50)); return $text; } -- 2.25.1