diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2018-02-21 11:08:33 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-21 11:08:33 +0100 |
commit | 7c6cc013ebec7bbdecbf9f5567d620fcfbb37212 (patch) | |
tree | caa49c590ff2098d035f68296694270a0868c93c | |
parent | 09857e5a95b0a200adb2955ace3b69be2603d3d6 (diff) | |
parent | 3bea8e05ad92502a318b06016682f30579e8144e (diff) | |
download | nextcloud-server-7c6cc013ebec7bbdecbf9f5567d620fcfbb37212.tar.gz nextcloud-server-7c6cc013ebec7bbdecbf9f5567d620fcfbb37212.zip |
Merge pull request #8468 from nextcloud/fix-unicode-avatars
Use mb_* string methods to extract first character for generated avatars
-rw-r--r-- | lib/private/Avatar.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/Avatar.php b/lib/private/Avatar.php index 352fcf05883..14632075ca1 100644 --- a/lib/private/Avatar.php +++ b/lib/private/Avatar.php @@ -263,7 +263,7 @@ class Avatar implements IAvatar { * @return string */ private function generateAvatar($userDisplayName, $size) { - $text = strtoupper($userDisplayName[0]); + $text = mb_strtoupper(mb_substr($userDisplayName, 0, 1), 'UTF-8'); $backgroundColor = $this->avatarBackgroundColor($userDisplayName); $im = imagecreatetruecolor($size, $size); |