esotalk / esoTalk

Fat-free forum software.
GNU General Public License v2.0
1.47k stars 237 forks source link

User avatar displays corrupted symbol when username is multibyte #305

Closed inliquid closed 10 years ago

inliquid commented 10 years ago

The solution

core/lib/functions.render.php:182

change

return "".(!empty($member["username"]) ? strtoupper($member["username"][0]) : " ")."";

to

return "".(!empty($member["username"]) ? mb_strtoupper(mb_substr($member["username"], 0, 1, "UTF-8"), "UTF-8") : " ")."";

Will try to make poll request (correct?) later on. Shame but never used Github for such things.

inliquid commented 10 years ago

additional comment:

this problem also connected to another problem of showing empty channels when clicking on tabs (jquery update), but working normally when refreshing the page. It seems that this happens when user having non-english nickname leaves last comment (with "?" in circle instead of first letter of the name). Fixing this problem automatically fixes this strange behaviour of jquery.

Tristan should be aware of it - this was reported by @hajduk.