From aa3c16b6af1909ad729ddd6d50282ff268521889 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 23 Nov 2013 16:34:08 +0100 Subject: [PATCH] Fix: chars were lost by function --- htdocs/core/lib/xcal.lib.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/lib/xcal.lib.php b/htdocs/core/lib/xcal.lib.php index 9badeae5290..4483e9540e5 100644 --- a/htdocs/core/lib/xcal.lib.php +++ b/htdocs/core/lib/xcal.lib.php @@ -484,7 +484,7 @@ function quotedPrintEncode($str,$forcal=0) { $newpara = ''; - $strlength=dol_strlen($line); + $strlength=strlen($line); // Do not use dol_strlen here, we need number of bytes for ($j = 0; $j <= ($strlength - 1); $j++) { $char = substr($line, $j, 1); @@ -493,7 +493,7 @@ function quotedPrintEncode($str,$forcal=0) if ( $ascii < 32 || $ascii == 61 || $ascii > 126 ) $char = '=' . strtoupper(sprintf("%02X", $ascii)); - if ((dol_strlen($newpara) + dol_strlen($char)) >= 76 ) + if ((strlen($newpara) + strlen($char)) >= 76 ) // Do not use dol_strlen here, we need number of bytes { $out .= $newpara . '=' . "\r\n"; // CRLF if ($forcal) $out .= " "; // + Space for cal