pBlueG / SA-MP-MySQL

MySQL plugin for San Andreas Multiplayer
BSD 3-Clause "New" or "Revised" License
196 stars 80 forks source link

R41-4 Hungarian charset issue #207

Closed pellerichard closed 4 years ago

pellerichard commented 5 years ago

Hi.

Back in the days when I used to write my own gamemode, I used to use R39, which worked just perfectly with the hungarian special characters, but since I decided to go for the latest plugin, I just can't get it to work. No matter what I do, it's just not showing them properly. An user on the forum confirmed this issue, as he wasn't able to fix it either. So I'm kinda hopeless. Should I just go back for R39, or is there some hidden function that fixes this issue?

Here is the sampforum thread: https://forum.sa-mp.com/showthread.php?t=664541 Please take a look at it as I included examples, code, and everything.

Could it be fixed in matter of time, or should I just go back for R39, since it worked perfectly?

Thanks.

maddinat0r commented 5 years ago

You'll have to set the correct character set in your gamemode with mysql_set_charset. If it doesn't work with R41-4, it very likely won't work with R39 either, as I haven't changed anything around charsets in R40+. You could try going back to R39 of course, but there's no guarantee that it'll just magically start to work. You could also set up a small test gamemode with R39 and try fetching data there, you should get the same results as with R41-4.

pellerichard commented 5 years ago

That's a really weird issue I'm experiencing then, anyways I'm gonna set up a test bench on R39, and R41-4 aswell, and will post the result here.

Thanks for replying, appreciate it.

zsoolt997 commented 4 years ago

I know it's more than 1 year old, but I assume you still experience this issue. Here's the solution. After the connection was established, run this piece of code: mysql_set_charset("cp1250"); It will set the caracther set to Windows1250, which is fine if you want to use those characters. Tested.

pellerichard commented 4 years ago

Definitely not a thing anymore on my side, but it's nice to see after a year that somebody else has experience the same issue as I did, I'm gonna close this ticket, cheers.