From 1b45affd3b11cf897b809d8ca1dd8defb0d24214 Mon Sep 17 00:00:00 2001 From: Xwiz Date: Sat, 12 Feb 2022 17:03:52 +0100 Subject: [PATCH] Change to mb_strlen --- src/Spout/Writer/Common/Entity/Worksheet.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Spout/Writer/Common/Entity/Worksheet.php b/src/Spout/Writer/Common/Entity/Worksheet.php index aa0b97f..f572d46 100644 --- a/src/Spout/Writer/Common/Entity/Worksheet.php +++ b/src/Spout/Writer/Common/Entity/Worksheet.php @@ -141,7 +141,7 @@ class Worksheet */ public function autoSetWidth($cell, $style, $zeroBasedIndex) { - $size = 1 + strlen($cell->getValue());//ensure we have at least 1 space + $size = 1 + mb_strlen($cell->getValue());//ensure we have at least 1 space $size *= $style->isFontBold() ? 1.2 : 1.0; $this->setMaxColumnWidth($zeroBasedIndex, $size); }