Can someone help me making a script that kicks people out of game if they have steam name with special characters thanks
because my database is note saving peoples name when they have a special character in their name
so i need a scripts that disables people that have special characters as steam id to connect thanks
Rather than kick people because you can’t fix something, how about you try changing the encoding of the username field to utf8mb4_unicode_ci to see if that solves your issue first?
That’s a good idea! I’m sure you can do it, and I encourage you to try your best. I agree with schwim that it could be an encoding problem. It also wouldn’t surprise me if something with SQL is escaping those usernames and messing something up. Keep that in mind
I think the better fix here is to handle the player name correctly when it reaches the database rather than kicking players whose Steam names contain special characters.
If normal names save correctly but names containing characters like é, ö, or other Unicode characters fail, I’d first check the database/table/column charset and make sure the connection is using UTF-8 as well. After that, check the site that writes the name and use a parameterized query instead of building the SQL string manually.
That should fix the underlying problem and allow players to keep their actual Steam names without needing to restrict or kick them.