diff --git a/src/LetterAvatar.php b/src/LetterAvatar.php index 36b7e99..247e6e9 100644 --- a/src/LetterAvatar.php +++ b/src/LetterAvatar.php @@ -122,7 +122,7 @@ public function generate() if ($number_of_word > 2) break; - $this->name_initials .= strtoupper(trim($word[0])); + $this->name_initials .= mb_strtoupper(trim(mb_substr($word, 0, 1, 'UTF-8'))); $number_of_word++; }