Closed Aftermoon-dev closed 7 years ago
Can you provide the plugin source where you modified the charset and did you change table collate?
I'm not change plugin source. Same Source for 1.6.2. And I already change table collate (utf8mb4_general_ci)
If you didn't change the source, how did you change the client charset?
I change MySQL Setting File.
Try modifying the sbpp_main.sp on https://github.com/sbpp/sourcebans-pp/blob/ad62c907fb720b41c0c8578ee34de45ae289466f/game/addons/sourcemod/scripting/sbpp_main.sp#L1003
Also, use utf8mb4_unicode_ci
Thanks For Answer. I try test now.
I change table's collations to utf8mb4_unicode_ci And I change plugins source in line 1003 -> SQL_SetCharset(DB, "utf8mb4"); Same Error [sbpp_main.smx] Verify Insert Query Failed: Incorrect string value: '\xE3 \x85 \x81 ...' for column 'reason' at row 1
This Error is Maybe SourceMod can't support Unicode Text.
SourceMod (and DBI, MySQL extensions) supports Unicode text. The problem is in the MySQL Server configuration.
But I try use this code, I can't See Korean Character in Chat. And, Another DB can write data include Korean Character. I ask to other Korean CS:GO Server Master, They answered to me, Our Server's SourceBans can write Korean Character. (They are use Windows) I use Newest Stable MetaMod, And SourceMod, Sourcebans++. I think it is very Strange :(
#include <sourcemod>
public OnPluginStart()
{
RegAdminCmd("sm_testcmd", Test_Command, ADMFLAG_BAN, "sm_ban <#userid|name> <minutes|0> [reason]");
}
public Action:Test_Command(client, args)
{
decl String:buffer[100];
GetCmdArg(1, buffer, sizeof(buffer));
PrintToChatAll("Buffer : %s", buffer);
return Plugin_Handled;
}
``
You entered "Korean character" in quotes?
sm_testcmd "your korean character"
CS:GO In-Game Chat can't write quotes.
In some source games (TF2, for example) too. Use console.
Console can't type korean (but copy & taste can see Korean in PrintToChat)
Expected Behavior
Ban Register in SourceBans Website, And DB
Current Behavior
Try In-Game Ban include Korean Reason, but can't register ban in Database (If Reason Write English, I can add ban.) sourcebans.log Error : L 08/14/2017 - 13:06:26: [sbpp_main.smx] Verify Insert Query Failed: Incorrect string value: '\xED \x85 \x8C ...' for column 'reason' at row 1 (I'm Korean, So Our Server's Ban Reason is Korean Lanaguage)
Possible Solution
Steps to Reproduce (for bugs)
Context
I'm Korean So We need Korean Reason, but We can't add Ban include Korean Language Reason. I change MySQL characterset Server characterset: utf8mb4 Db characterset: utf8mb4 Client characterset: utf8mb4 Conn. characterset: utf8mb4
But Nothing Change. We still can't ban user.
Your Environment