AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   UTF-8 names in amxbans (https://forums.alliedmods.net/showthread.php?t=228922)

last_hope 10-29-2013 11:06

UTF-8 names in amxbans
 
Hi all.
I have a problem with nicknames on database.
On web part nicks, adimin_nick and reasons looks horrible.
I make sql dump and see that wrong encoded nicks already in database.
MySQL default UTF-8.
WEB same.

Question:
How I can transfer UTF-8 symbols via AMXX?

here some code from amxbans6:
PHP Code:


register_native
("amxbans_get_admin_nick","native_amxbans_get_nick")

public 
native_amxbans_get_nick() {
    
    new 
id get_param(1)
    new 
lenget_param(3)
    
    
set_array(2,g_szAdminNick[id],len)
}

or

ArrayGetString(g_AdminNick,index,g_szAdminNick[id],31)

or 

new 
pquery[1024]
formatex(pquerycharsmax(pquery), "INSERT INTO `%s%s` (player_id,player_ip,player_nick,admin_ip,admin_id,admin_nick,ban_type,ban_reason,ban_created,ban_length,server_name,server_ip,expired) \
            VALUES('%s','%s','%s','%s','%s','%s','%s','%s',UNIX_TIMESTAMP(NOW()),%d,'%s','%s:%s',0)"
, \
            
g_dbPrefixtbl_bansg_choicePlayerAuthid[id],g_choicePlayerIp[id],player_nick,admin_ip,admin_steamid,admin_nick,g_ban_type[id],g_choiceReason[id],g_choiceTime[id],servername_safe,g_ip,g_port

So, anyone know where begin error of encoding?
On taking nickname or on making sql query?

fysiks 10-29-2013 20:38

Re: UTF-8 names in amxbans
 
You need to ask on the AMX Bans website.

last_hope 10-30-2013 03:27

Re: UTF-8 names in amxbans
 
Quote:

Originally Posted by fysiks (Post 2054404)
You need to ask on the AMX Bans website.

It's amx question, amx sql query.
CSFA do same things with nicknames.
And what?
Ask CSFA author to "how works amx with utf-8 with sql?


All times are GMT -4. The time now is 23:20.

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