Problem with 'mysql_set_charset'
#1

Hi,

I'm having an issue with BlueG's MySQL plugin (I'm using the newest version), seems like I can't set mysql char set to latin5_turkish_ci, isn't it supported or am I doing something wrong?

pawn Код:
MySQL connection:

mydb = mysql_connect_file("mydbsettings.ini");
mysql_set_charset("latin5_turkish_ci",mydb);

MySQL LOG:

[DEBUG] CHandle::GetErrorId - return value: true, error id: '2019', error msg: 'Can't initialize character set latin5_turkish_ci (path: compiled_in)'
[DEBUG] mysql_errno: return value: '
2019'
I posted an issue on GitHub as well but wanted to see if anyone else had this problem before.
https://github.com/pBlueG/SA-MP-MySQL/issues/156
Reply
#2

Put this into the .inc
Код:
native mysql_set_charset(charset[], connectionHandle = 1);
Reply
#3

Quote:
Originally Posted by JasonRiggs
Посмотреть сообщение
Put this into the .inc
Код:
native mysql_set_charset(charset[], connectionHandle = 1);
That's just stupid..
Reply
#4

Quote:
Originally Posted by JasonRiggs
Посмотреть сообщение
Put this into the .inc
Код:
native mysql_set_charset(charset[], connectionHandle = 1);
Why? There's no point of stating it there.
Reply
#5

Sorry, I thought that It was undefined symbol..
Reply
#6

I still need help.
Reply
#7

Try this.

Код:
mysql_tquery(g_SQL, "SET NAMES `latin5`", "", "");
mysql_tquery(g_SQL, "SET CHARACTER SET `latin5`","", "");
mysql_tquery(g_SQL, "SET COLLATION_CONNECTION = `latin5_turkish_ci`", "", "");
Reply
#8

Quote:
Originally Posted by Freedom.
Посмотреть сообщение
Try this.

Код:
mysql_tquery(g_SQL, "SET NAMES `latin5`", "", "");
mysql_tquery(g_SQL, "SET CHARACTER SET `latin5`","", "");
mysql_tquery(g_SQL, "SET COLLATION_CONNECTION = `latin5_turkish_ci`", "", "");
Well, after these I don't have any errors but the problem is I still can't use Turkish characters in my database, the string is "??".

I'm not sure if I'm doing something wrong but seems like the latest version of mysql doesn't support foreign characters at all?

EDIT:

My database is also setup to latin5_turkish_ci so it's not about my database, I'm guessing.
Reply
#9

Well, I changed all of my MySQL tables' to latin5_turkish_ci but I still have the same issue, when I change the value manually, it shows foreign characters but when I load it in-game it doesn't show up and when I change the value using MySQL query UPDATE, it still has the same problem.
Reply
#10

EDIT:

I'm now usin WAMP server and it works fine. Now, I can SAVE variables properly but still having the same issue when LOADing variables from the database,

But I also got rid of this problem by using charset queries stated above;

pawn Код:
mysql_tquery(g_SQL, "SET NAMES `latin5`", "", "");
mysql_tquery(g_SQL, "SET CHARACTER SET `latin5`","", "");
mysql_tquery(g_SQL, "SET COLLATION_CONNECTION = `latin5_turkish_ci`", "", "");
This is how I got rid of this issue, just wanted to edit my post, if you'd have this problem as well you can try these steps to fix it.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)