Raised This Month: $ Target: $400
 0% 

UTF-8 names in amxbans


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
last_hope
Senior Member
Join Date: Dec 2011
Old 10-29-2013 , 11:06   UTF-8 names in amxbans
Reply With Quote #1

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?
__________________
last_hope is offline
Send a message via ICQ to last_hope
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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