-
Notifications
You must be signed in to change notification settings - Fork 3
Description
See views.py, line 841:
# TODO: clan name of π± breaks due to incompatible unicode collation or something
TNNT's MySQL database currently encodes usernames & clan names in the outdated utf8mb3 format, limiting names to UTF characters of 3 bytes or less. This excludes emoji (π’), as well as a few Indian & indigenous alphabets and some other fun stuff like math.
The default MySQL charset is utf8, which actually isn't UTF-8. MySQL still aliases utf8mb3 as utf8 (quite the misnomer!) and currently recommends manually switching over to utf8mb4, while they toy π§Έ with updating their utf8 alias & defaults to utf8mb4 (source).
While the TNNT MySQL database only supports utfmb3, the TNNT backend is more than π happy to accept 4-π§π»ββοΈ byte UTF-8 values from users via form π fields and feed them π©Έ directly as MySQL qβries, leading to π juicy & convoluted π₯¨ errors:
OperationalError at /clanmgmt
(1267, "Illegal mix of collations (utf8mb4_general_ci,IMPLICIT) and (utf8mb3_general_ci,COERCIBLE) for operation '='")
tl;dr - update backend MySQL database to utf8mb4 so i can have rly π clan name, pretty pretty plz πΈ