array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'zh', ), 'this' => array ( 0 => 'function.cubrid-get-charset.php', 1 => 'cubrid_get_charset', ), 'up' => array ( 0 => 'ref.cubrid.php', 1 => 'CUBRID 函数', ), 'prev' => array ( 0 => 'function.cubrid-get-autocommit.php', 1 => 'cubrid_get_autocommit', ), 'next' => array ( 0 => 'function.cubrid-get-class-name.php', 1 => 'cubrid_get_class_name', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/cubrid/functions/cubrid-get-charset.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PECL CUBRID >= 8.3.0)
cubrid_get_charset — Return the current CUBRID connection charset
This function returns the current CUBRID connection charset and is similar to the CUBRID MySQL compatible function cubrid_client_encoding().
conn_identifier
The CUBRID connection.
A string that represents the CUBRID connection charset on success, 或者在失败时返回 false
.
示例 #1 cubrid_get_charset() example
<?php
$con = cubrid_connect("localhost", 33000, "demodb");
if (!$con)
{
die('Could not connect.');
}
printf("CUBRID current charset: %s\n", cubrid_get_charset($con));
?>
以上示例会输出:
CUBRID current charset: iso8859-1