]> granicus.if.org Git - php/commitdiff
Unify, force one charset at connect, thus fixing
authorAndrey Hristov <andrey@php.net>
Wed, 22 Sep 2010 18:25:33 +0000 (18:25 +0000)
committerAndrey Hristov <andrey@php.net>
Wed, 22 Sep 2010 18:25:33 +0000 (18:25 +0000)
test failures because different servers have different
system charsets.

ext/mysqli/tests/connect.inc
ext/mysqli/tests/mysqli_fetch_field.phpt
ext/mysqli/tests/mysqli_fetch_field_oo.phpt
ext/mysqli/tests/mysqli_fetch_fields.phpt
ext/mysqli/tests/mysqli_field_seek.phpt
ext/mysqli/tests/mysqli_stmt_get_result_metadata_fetch_field.phpt

index 92caa25e934fb760dbf87102936fd1be80799b2f..02a71ec0b801c2de8f5390f5a59ede9218a9aebf 100644 (file)
 
                        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;
index e90599257ef586a4fc84bfa90ff564ed5a13e682..a99864ce2f96cdcba5af378ccf083c424b9101ca 100644 (file)
@@ -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"]=>
index f7dcd9b9af3940679b5884360cfe0265e3e0989c..fc51e858b331a87d369040f836f849bc5ac4a945 100644 (file)
@@ -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"]=>
index a87956de1144930be25115127e3b987c244e8db6..332db84c6c604ba481867e1c40aefcc253d38274 100644 (file)
@@ -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"]=>
index 58692a620dd45497b8ea6bd66156693dd6920bfc..a0cab48ec978a74031e681d554f0870848e9a11a 100644 (file)
@@ -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"]=>
index 1a2dba413330ac0df61e0b67b9d1f110ddc1f250..9c876e522753c5730f7f436e46a554c1f6bd04f4 100644 (file)
@@ -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"]=>