Skip to content

Commit

Permalink
Added utf16 and utf32 support, as in MySQL 5.5, in mysqlnd.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
faizshukri committed Aug 16, 2010
1 parent 5d54d79 commit 277c7d4
Show file tree
Hide file tree
Showing 3 changed files with 206 additions and 222 deletions.
3 changes: 2 additions & 1 deletion ext/mysqli/tests/mysqli_character_set.phpt
Expand Up @@ -47,7 +47,8 @@ if (version_compare(PHP_VERSION, '5.9.9', '>') == 1) {
foreach ($charsets as $charset) {
$k = $charset['Charset'];
/* The server currently 17.07.2007 can't handle data sent in ucs2 */
if ($charset['Charset'] == 'ucs2') {
/* The server currently 16.08.2010 can't handle data sent in utf16 and utf32 */
if ($charset['Charset'] == 'ucs2' || $charset['Charset'] == 'utf16' || $charset['Charset'] == 'utf32') {
continue;
}

Expand Down
2 changes: 1 addition & 1 deletion ext/mysqli/tests/mysqli_set_charset.phpt
Expand Up @@ -102,7 +102,7 @@ if ((($res = mysqli_query($link, 'SHOW CHARACTER SET LIKE "latin1"', MYSQLI_STOR
printf("[016] Cannot get list of character sets\n");

while ($tmp = mysqli_fetch_assoc($res)) {
if ('ucs2' == $tmp['Charset'])
if ('ucs2' == $tmp['Charset'] || 'utf16' == $tmp['Charset'] || 'utf32' == $tmp['Charset'])
continue;

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

0 comments on commit 277c7d4

Please sign in to comment.