AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   General (https://forums.alliedmods.net/forumdisplay.php?f=58)
-   -   Incorrect string value on insert DB (https://forums.alliedmods.net/showthread.php?t=329376)

TheFlyingApple 12-21-2020 08:59

Incorrect string value on insert DB
 
Hello,

Ever since i changed host of my Database, I have this weird error every time my plugins try to upload data to the DB. The error looks like this:

Code:

[sbpp_main.smx] Verify Insert Query Failed: Incorrect string value: '\xF0\x9D\x96\x98\xF0\x9D...' for column 'name' at row 1
I have allready checked my Database configuration and all column are of the type 'utf8mb4_unicode_ci' and my 'my.cnf' (Global database config) looks like this:

Code:

[mysqld]
collation-server = utf8mb4_unicode_ci
character-set-server = utf8mb4
init-connect='SET NAMES utf8mb4'

[client]
default-character-set=utf8mb4

[mysql]
default-character-set=utf8mb4

I know it's a DB problem and i have scoured the internet, but i have come up empty handed... Please help :grrr:

Fyren 12-29-2020 20:42

Re: Incorrect string value on insert DB
 
You probably have to use SQL_SetCharset/db.SetCharset in your plugin to set utf8mb4.


All times are GMT -4. The time now is 05:13.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.