fmk Wed Dec 21 22:44:04 2005 EDT Modified files: /php-src NEWS php.ini-dist php.ini-recommended /php-src/ext/mssql php_mssql.c php_mssql.h Log: Fix #35730 Use correct character encoding with FreeTDS http://cvs.php.net/viewcvs.cgi/php-src/NEWS?r1=1.2087&r2=1.2088&diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2087 php-src/NEWS:1.2088 --- php-src/NEWS:1.2087 Tue Nov 29 23:23:32 2005 +++ php-src/NEWS Wed Dec 21 22:44:04 2005 @@ -26,4 +26,5 @@ the part of haystack before or after first occurence of needle. (Johannes) - Added possibility to check in which extension an internal function was defined using reflection API. (Johannes) +- Fixed bug #35730 (Use correct character encoding, and allow setting it) (Frank) - Fixed bug #34286 (__toString() behavior is inconsistent). (Marcus) http://cvs.php.net/viewcvs.cgi/php-src/php.ini-dist?r1=1.239&r2=1.240&diff_format=u Index: php-src/php.ini-dist diff -u php-src/php.ini-dist:1.239 php-src/php.ini-dist:1.240 --- php-src/php.ini-dist:1.239 Fri Dec 2 18:42:40 2005 +++ php-src/php.ini-dist Wed Dec 21 22:44:04 2005 @@ -1046,6 +1046,11 @@ ; FreeTDS defaults to 4096 ;mssql.max_procs = -1 +; Specify client character set. +; If empty or not set the client charset from freetds.comf is used +; This is only used when compiled with FreeTDS +;mssql.charset = "ISO-8859-1" + [Assertion] ; Assert(expr); active by default. ;assert.active = On http://cvs.php.net/viewcvs.cgi/php-src/php.ini-recommended?r1=1.188&r2=1.189&diff_format=u Index: php-src/php.ini-recommended diff -u php-src/php.ini-recommended:1.188 php-src/php.ini-recommended:1.189 --- php-src/php.ini-recommended:1.188 Fri Dec 2 18:42:40 2005 +++ php-src/php.ini-recommended Wed Dec 21 22:44:04 2005 @@ -1103,6 +1103,11 @@ ; FreeTDS defaults to 4096 ;mssql.max_procs = -1 +; Specify client character set. +; If empty or not set the client charset from freetds.comf is used +; This is only used when compiled with FreeTDS +;mssql.charset = "ISO-8859-1" + [Assertion] ; Assert(expr); active by default. ;assert.active = On http://cvs.php.net/viewcvs.cgi/php-src/ext/mssql/php_mssql.c?r1=1.161&r2=1.162&diff_format=u Index: php-src/ext/mssql/php_mssql.c diff -u php-src/ext/mssql/php_mssql.c:1.161 php-src/ext/mssql/php_mssql.c:1.162 --- php-src/ext/mssql/php_mssql.c:1.161 Tue Dec 6 01:25:13 2005 +++ php-src/ext/mssql/php_mssql.c Wed Dec 21 22:44:04 2005 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_mssql.c,v 1.161 2005/12/06 01:25:13 sniper Exp $ */ +/* $Id: php_mssql.c,v 1.162 2005/12/21 22:44:04 fmk Exp $ */ #ifdef COMPILE_DL_MSSQL #define HAVE_MSSQL 1 @@ -141,6 +141,9 @@ STD_PHP_INI_BOOLEAN("mssql.datetimeconvert", "1", PHP_INI_ALL, OnUpdateBool, datetimeconvert, zend_mssql_globals, mssql_globals) STD_PHP_INI_BOOLEAN("mssql.secure_connection", "0", PHP_INI_SYSTEM, OnUpdateBool, secure_connection, zend_mssql_globals, mssql_globals) STD_PHP_INI_ENTRY_EX("mssql.max_procs", "-1", PHP_INI_ALL, OnUpdateLong, max_procs, zend_mssql_globals, mssql_globals, display_link_numbers) +#ifdef HAVE_FREETDS + STD_PHP_INI_ENTRY("mssql.charset", "", PHP_INI_ALL, OnUpdateString, charset, zend_mssql_globals, mssql_globals) +#endif PHP_INI_END() /* error handler */ @@ -495,7 +498,9 @@ #endif #ifdef HAVE_FREETDS - DBSETLCHARSET(mssql.login, "ISO-8859-1"); + if (MS_SQL_G(charset) && strlen(MS_SQL_G(charset))) { + DBSETLCHARSET(mssql.login, MS_SQL_G(charset)); + } #endif DBSETLAPP(mssql.login,MS_SQL_G(appname)); http://cvs.php.net/viewcvs.cgi/php-src/ext/mssql/php_mssql.h?r1=1.43&r2=1.44&diff_format=u Index: php-src/ext/mssql/php_mssql.h diff -u php-src/ext/mssql/php_mssql.h:1.43 php-src/ext/mssql/php_mssql.h:1.44 --- php-src/ext/mssql/php_mssql.h:1.43 Tue Dec 6 01:25:13 2005 +++ php-src/ext/mssql/php_mssql.h Wed Dec 21 22:44:04 2005 @@ -17,7 +17,7 @@ */ -/* $Id: php_mssql.h,v 1.43 2005/12/06 01:25:13 sniper Exp $ */ +/* $Id: php_mssql.h,v 1.44 2005/12/21 22:44:04 fmk Exp $ */ #ifndef PHP_MSSQL_H #define PHP_MSSQL_H @@ -158,6 +158,9 @@ zend_bool allow_persistent; char *appname; char *server_message; +#ifdef HAVE_FREETDS + char *charset; +#endif long min_error_severity, min_message_severity; long cfg_min_error_severity, cfg_min_message_severity; long connect_timeout, timeout;
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php