Raised This Month: $12 Target: $400
 3% 

Solved Cant fetch UTF-8 with SQL_FetchString


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
midnight9
Senior Member
Join Date: Nov 2012
Old 02-14-2018 , 14:07   Cant fetch UTF-8 with SQL_FetchString
Reply With Quote #1

Hello, Im trying fetch players names from database using SQL_FetchString, but it does not work with utf-8 characters, is that normal?

Last edited by midnight9; 02-14-2018 at 15:34.
midnight9 is offline
R1KO
Member
Join Date: Sep 2013
Old 02-14-2018 , 14:53   Re: Cant fetch UTF-8 with SQL_FetchString
Reply With Quote #2

https://sm.alliedmods.net/new-api/db...ase/SetCharset
Use
PHP Code:
g_hDatabase.SetCharset("utf8"); 
after connecting to the database
R1KO is offline
Send a message via Skype™ to R1KO
midnight9
Senior Member
Join Date: Nov 2012
Old 02-14-2018 , 15:34   Re: Cant fetch UTF-8 with SQL_FetchString
Reply With Quote #3

Quote:
Originally Posted by R1KO View Post
https://sm.alliedmods.net/new-api/db...ase/SetCharset
Use
PHP Code:
g_hDatabase.SetCharset("utf8"); 
after connecting to the database
Worked, thanks alot!
midnight9 is offline
Reply


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 17:51.


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