szporwolik / perun

Perun toolset for DCS World server admins. Reads simulation data and pushes it MySQL database.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Change database character set to utf8

pottom opened this issue · comments

Please change the SQL template character set to utf8mb4 and collation utf8mb4_unicode_ci

Please modify in the next version of the program line form_Main.cs -> Globals.DatabaseConnection.DatabaseConnectionString = $"server={con_txt_mysql_server.Text};user={con_txt_mysql_username.Text};database={con_txt_mysql_database.Text};port={con_txt_mysql_port.Text};password={con_txt_mysql_password.Text}";

TO

Globals.DatabaseConnection.DatabaseConnectionString = $"server={con_txt_mysql_server.Text};user={con_txt_mysql_username.Text};database={con_txt_mysql_database.Text};port={con_txt_mysql_port.Text};password={con_txt_mysql_password.Text};CharSet=utf8";

We use accented characters in our server's chat so this is a solution for the correct character displaying.

commented

That, plus db's default charset needs to be utf8mb4, not utf8.