...et){ self::$_charset = strtoupper($charset); if (self::$_charset == 'UTF8') { self::$_charset = 'UTF-8'; } return $this;} 设置字符集 默认字符集是 UTF-8, 这是指 getResult 系列函数的 $text 参数的字符集
...et){ $this->_charset = strtoupper($charset); if ($this->_charset == 'UTF8') { $this->_charset = 'UTF-8'; } return $this;} 设置字符集 默认字符集是 UTF-8, 如果您提交的搜索语句和预期得到的搜索结果为其它字符集, 请先设置
...ion getIterator(){ if ($this->_charset !== null && $this->_charset !== 'UTF-8') { $from = $this->_meta === null ? $this->_charset : 'UTF-8'; $to = $this->_meta === null ? 'UTF-8' : $this->_charset; return new ArrayIterator(XS::convert($this->_data, $to, $from)); } retur...
...et){ $this->_charset = strtoupper($charset); if ($this->_charset == 'UTF8') { $this->_charset = 'UTF-8'; }} 设置文档字符集
...on setCharset($charset){ if ($charset !== null && strcasecmp($charset, 'utf8') && strcasecmp($charset, 'utf-8')) { self::$charset = $charset; ob_start(array(__CLASS__, 'convertOut')); }} 设置输出、输入编码 默认输出的中文编码均为 UTF-8
setUtf8() 方法 public bool setUtf8() {return} bool 始终返回 true 源码: sdk/php/util/XSDataSource.class.php#L891 (显示) public function setUtf8(){ // BUGFIXED: 此处应为不带引号的 utf8 return $this->obj->prepare("SET NAMES utf8")->execute();} 将输出...
...lse) { return $ret; } $buf = XS::convert($query, 'UTF-8', $this->_charset); $cmd = array('cmd' => XS_CMD_QUERY_GET_CORRECTED, 'buf' => $buf); $res = $this->execCommand($cmd, XS_CMD_OK_QUERY_CORRECTED); if ($res->buf !== '') { $ret = explode("\...
...x(1, min(20, intval($limit))); try { $buf = XS::convert($query, 'UTF-8', $this->_charset); $cmd = array('cmd' => XS_CMD_QUERY_GET_EXPANDED, 'arg1' => $limit, 'buf' => $buf); $res = $this->execCommand($cmd, XS_CMD_OK_RESULT_BEGIN); // echo "Raw Query: " . $res->buf . "\...
...vno = $this->xs->getField($field)->vno; $from = XS::convert($from, 'UTF-8', $this->_charset); $to = XS::convert($to, 'UTF-8', $this->_charset); if ($from === null) { $cmd = new XSCommand(XS_CMD_QUERY_VALCMP, XS_CMD_QUERY_OP_FILTER, $vno, $to, chr(XS_CMD_VALCMP_LE)); ...
... XSDatabasePDO query1() 查询数据库首行 XSDatabase setUtf8() 将输出字符集设置为 UTF-8 XSDatabasePDO_MySQL Protected 方法 隐去继承来的方法 名称描述定义于 makeDsn() 生成 MySQL DSN XSDatabasePDO_MySQL 方法明细 ma...