[PATCH] patch to make mysql select correct encoding on client libraries.

php.internals

scuzzy

20 years ago
Hi, I've attached a patch, that will allow people to be able to change the client default encoding type, as this was not possible before. I looked through the php mysql client source, and found no traces of something that could actually set the default client encoding type. basically mysql_options(&myHadle, MYSQL_SET_CHARSET_NAME, "utf8"); or whatever charset you choose. It reads the option from the php.ini file, which I've also patched to include the line required, but is commented by default: ; mysql.default_character_set = "utf8" When it's commented, it falls back to the mysql client library default of latin1. I've read a few forums, and this is apparently a common problem, and I just thought I'd lend a hand to help you guys out. I'm sure you get inundated with stuff like this all the time. Anyway. Take a look at the patch, it's really simple, but it helped us out as a company quite a lot. (www.complinet.com) I hope it helps. Thanks Daine Mamacos.
-- random signature

Andrey Hristov

20 years ago
Hi, the patch did not go through :( Andrey Quoting scuzzy <scuzzy@reverseorder.net>: