Aust1n46 / VentureChat

GNU General Public License v3.0
39 stars 49 forks source link

MySQL throws error when sending Unicode characters #53

Open Brickgard opened 1 year ago

Brickgard commented 1 year ago

Sending a chat character such as  throws a MySQL error in console; no issues are seen in operation, just database data.

Error: PasteBin

Aust1n46 commented 1 year ago

Non unicode characters might not be compatible. I can't remember what encoding I had selected.

Starmism commented 1 year ago

An easy fix for this is to set the table collation manually using the following command: ALTER TABLE VentureChat COLLATE = utf8mb4_unicode_520_ci;.

This sets the table collation to the most permissive unicode set, including emojis and custom resource pack bitmaps. I got the correct encoding from here: https://dba.stackexchange.com/a/292728.

Ideally VentureChat would set this automatically when it creates the table, but this can fix an existing installation.