Skip to content

Commit 277c7d4

Browse files
committed
Added utf16 and utf32 support, as in MySQL 5.5, in mysqlnd.
Fixed tests, so they don't try to use SET NAMES utf16|utf32, as character_set_client can't be set to those (the lexer can't read ucs2, utf16 and utf32). Added support for 4-byte utf8, as found in MySQL 5.5
1 parent 5d54d79 commit 277c7d4

File tree

3 files changed

+206
-222
lines changed

3 files changed

+206
-222
lines changed

ext/mysqli/tests/mysqli_character_set.phpt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ if (version_compare(PHP_VERSION, '5.9.9', '>') == 1) {
4747
foreach ($charsets as $charset) {
4848
$k = $charset['Charset'];
4949
/* The server currently 17.07.2007 can't handle data sent in ucs2 */
50-
if ($charset['Charset'] == 'ucs2') {
50+
/* The server currently 16.08.2010 can't handle data sent in utf16 and utf32 */
51+
if ($charset['Charset'] == 'ucs2' || $charset['Charset'] == 'utf16' || $charset['Charset'] == 'utf32') {
5152
continue;
5253
}
5354

ext/mysqli/tests/mysqli_set_charset.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ if ((($res = mysqli_query($link, 'SHOW CHARACTER SET LIKE "latin1"', MYSQLI_STOR
102102
printf("[016] Cannot get list of character sets\n");
103103

104104
while ($tmp = mysqli_fetch_assoc($res)) {
105-
if ('ucs2' == $tmp['Charset'])
105+
if ('ucs2' == $tmp['Charset'] || 'utf16' == $tmp['Charset'] || 'utf32' == $tmp['Charset'])
106106
continue;
107107

108108
/* Uncomment to see where it hangs - var_dump($tmp); flush(); */

0 commit comments

Comments
 (0)