From: Andrey Hristov Date: Wed, 22 Sep 2010 18:25:33 +0000 (+0000) Subject: Unify, force one charset at connect, thus fixing X-Git-Tag: php-5.3.4RC1~208 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bdaec773b54431a74a0b3a3927c5261ddfde2bc6;p=php Unify, force one charset at connect, thus fixing test failures because different servers have different system charsets. --- diff --git a/ext/mysqli/tests/connect.inc b/ext/mysqli/tests/connect.inc index 92caa25e93..02a71ec0b8 100644 --- a/ext/mysqli/tests/connect.inc +++ b/ext/mysqli/tests/connect.inc @@ -90,10 +90,12 @@ if ($flags !== false) { $link = mysqli_init(); + $link->options(MYSQLI_SET_CHARSET_NAME, "utf8"); if (!mysqli_real_connect($link, $host, $user, $passwd, $db, $port, $socket, $flags)) $link = false; } else { $link = mysqli_connect($host, $user, $passwd, $db, $port, $socket); + $link->set_charset("utf8"); } return $link; diff --git a/ext/mysqli/tests/mysqli_fetch_field.phpt b/ext/mysqli/tests/mysqli_fetch_field.phpt index e90599257e..a99864ce2f 100644 --- a/ext/mysqli/tests/mysqli_fetch_field.phpt +++ b/ext/mysqli/tests/mysqli_fetch_field.phpt @@ -99,9 +99,9 @@ object(stdClass)#%d (11) { [%u|b%"max_length"]=> int(1) [%u|b%"length"]=> - int(1) + int(%d) [%u|b%"charsetnr"]=> - int(8) + int(%d) [%u|b%"flags"]=> int(0) [%u|b%"type"]=> diff --git a/ext/mysqli/tests/mysqli_fetch_field_oo.phpt b/ext/mysqli/tests/mysqli_fetch_field_oo.phpt index f7dcd9b9af..fc51e858b3 100644 --- a/ext/mysqli/tests/mysqli_fetch_field_oo.phpt +++ b/ext/mysqli/tests/mysqli_fetch_field_oo.phpt @@ -87,9 +87,9 @@ object(stdClass)#%d (11) { [%u|b%"max_length"]=> int(1) [%u|b%"length"]=> - int(1) + int(%d) [%u|b%"charsetnr"]=> - int(8) + int(%d) [%u|b%"flags"]=> int(0) [%u|b%"type"]=> diff --git a/ext/mysqli/tests/mysqli_fetch_fields.phpt b/ext/mysqli/tests/mysqli_fetch_fields.phpt index a87956de11..332db84c6c 100644 --- a/ext/mysqli/tests/mysqli_fetch_fields.phpt +++ b/ext/mysqli/tests/mysqli_fetch_fields.phpt @@ -80,9 +80,9 @@ object(stdClass)#%d (11) { [%u|b%"max_length"]=> int(1) [%u|b%"length"]=> - int(1) + int(%d) [%u|b%"charsetnr"]=> - int(8) + int(%d) [%u|b%"flags"]=> int(0) [%u|b%"type"]=> diff --git a/ext/mysqli/tests/mysqli_field_seek.phpt b/ext/mysqli/tests/mysqli_field_seek.phpt index 58692a620d..a0cab48ec9 100644 --- a/ext/mysqli/tests/mysqli_field_seek.phpt +++ b/ext/mysqli/tests/mysqli_field_seek.phpt @@ -172,9 +172,9 @@ object(stdClass)#%d (11) { [%u|b%"max_length"]=> int(0) [%u|b%"length"]=> - int(1) + int(%d) [%u|b%"charsetnr"]=> - int(8) + int(%d) [%u|b%"flags"]=> int(0) [%u|b%"type"]=> diff --git a/ext/mysqli/tests/mysqli_stmt_get_result_metadata_fetch_field.phpt b/ext/mysqli/tests/mysqli_stmt_get_result_metadata_fetch_field.phpt index 1a2dba4133..9c876e5227 100644 --- a/ext/mysqli/tests/mysqli_stmt_get_result_metadata_fetch_field.phpt +++ b/ext/mysqli/tests/mysqli_stmt_get_result_metadata_fetch_field.phpt @@ -81,9 +81,9 @@ object(stdClass)#%d (11) { [%u|b%"max_length"]=> int(1) [%u|b%"length"]=> - int(1) + int(%d) [%u|b%"charsetnr"]=> - int(8) + int(%d) [%u|b%"flags"]=> int(0) [%u|b%"type"]=> @@ -129,9 +129,9 @@ object(stdClass)#%d (11) { [%u|b%"max_length"]=> int(2) [%u|b%"length"]=> - int(2) + int(%d) [%u|b%"charsetnr"]=> - int(8) + int(%d) [%u|b%"flags"]=> int(0) [%u|b%"type"]=>