Use mysqli_set_charset() instead of SET NAMES
Merge pull request #3731 from Bakual/2.5-SetConnection

Use set_charset instead of query to set the db connection charset

User confirms patch is fine. Merging.