Frug / AJAX-Chat

A fully customizable web chat implemented in JavaScript, PHP and MySQL which integrates nicely with common forum systems like phpBB, MyBB, FluxBB, SMF and vBulletin. A Flash and Ruby based socket connection can be used to boost performance.
http://frug.github.io/AJAX-Chat/
547 stars 300 forks source link

Case-insensitive online user list #164

Closed marquisite closed 10 years ago

marquisite commented 10 years ago

This modification was originally posted to Google Groups by Ingrid but I think it would be of benefit to AJAX-Chat (it is so simple).

There are some alternatives to this method, like changing the collation of the userName field in ajaxchat_online from "utf_bin" to "utf8_general_ci".

With multiple language translations, I'm not sure which of these methods would be best.

Frug commented 10 years ago

Ah, I didn't know it was doing that. This is probably the best solution. I doubt changing to utf8_general would break anything for most people, but usernames are meant to be unique and case sensitive, and so an SQL comparison would want to be case sensitive. Also I think the general collations ignore accents on characters, which could be a bad issue.