--TEST-- mysql_set_charset() - STUB, function usage not recommended --SKIPIF-- ') == 1) { die('skip set character set not functional with PHP 6 (fomerly PHP 6 && unicode.semantics=On)'); } if (!function_exists('mysql_set_charset')) die("skip Function not available"); ?> --FILE-- ') == 1)) $expect = false; else $expect = true; $charsets = array('latin1', 'latin2'); foreach ($charsets as $k => $charset) { if (!($res = mysql_query(sprintf('SHOW CHARACTER SET LIKE "%s"', $charset), $link))) continue; mysql_free_result($res); if ($expect !== ($tmp = @mysql_set_charset($charset, $link))) printf("[006] Expecting %s/%s got %s/%s\n", gettype($expect), $expect, gettype($tmp), $tmp); } mysql_close($link); print "done!"; ?> --EXPECTF-- Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d done!