选择语言 :

 Module_Database_Driver::_change_charset

切换编码

null Module_Database_Driver::_change_charset( string & $value )

参数列表

参数 类型 描述 默认值
$value string $value
File: ./modules/database/driver.class.php
protected function _change_charset(&$value)
{
    if ($this->config['auto_change_charset'] && $this->config['charset']!='UTF8')
    {
        # 转换编码编码
        if (IS_MBSTRING)
        {
            $value = (string)mb_convert_encoding($value, $this->config['data_charset'],'UTF-8');
        }
        else
        {
            $value = (string)iconv('UTF-8', $this->config['data_charset'].'//IGNORE', $value);
        }
    }

    return $value;
}