Edit report at http://bugs.php.net/bug.php?id=44118&edit=1
ID: 44118 Updated by: johan...@php.net Reported by: slava_reg at nsys dot by Summary: [PATCH] MySQL: Set connection charset via php.ini option -Status: Assigned +Status: Wont fix Type: Feature/Change Request Package: MySQL related Operating System: any PHP Version: 5.2.5 Assigned To: mysql Block user comment: N Private report: N New Comment: The application has to know the encoding being used, else some strange things might happen. We have seen the trouble in having this globally configurable when Gentoo decided to use Utf-8 for their MySQL installations by default instead of MySQL's default. I doubt you can make an application Utf-8 comaptible by just setting such a low-level switch (it won't affect the HTTP Content-type header or HTML forms, thus receiving data in a wrong encoding from the user, not re-encode it etc.) Previous Comments: ------------------------------------------------------------------------ [2011-01-06 16:19:52] u...@php.net Not sure if this is really needed. It can be done in user land. Its a bit of a convenience feature. Not many votes for it... Andrey, Johannes...? ------------------------------------------------------------------------ [2008-02-14 13:00:54] slava_reg at nsys dot by Description: ------------ Hi, As I'm tired of patching various user-installed php-engines to work correctly with newer MySQL versions (4.1.x +) that require connection character set to be specified, I decided to solve the problem at the php level. So, I patched both mysql and mysqli extensions (based on an idea found somewhere in internet). Result is available at: http://bubble.nsys.by/projects/patches/php/php-5.2.5-mysql-client-charset.patch The patch introduces two more php.ini directives: mysql.client_charset and mysqli.client_charset As those directives are optional, the patch shouldn't break any existing functionality, but it could *really* help users who's native language is not latin and who want to use some php-scripted engine with mysql 'out-of-the-box'. Best, Vladislav Bogdanov ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=44118&edit=1