Skip to content

Add full UTF-8 support for cooler & more internationally-inclusive user/clan naming 💝 #25

@ciraben

Description

@ciraben

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 🌸

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions