问问题
1342 次
3 回答
1
The charset directive in the DSN actually applies to MSSQL. I simply needed to execute SET NAMES
. Sorry about that.
I achieved that thus:
parent::__construct("{$this->engine}:host={$this->host};dbname={$this->name}",
$this->user, $this->password,
array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES 'UTF8'"));
于 2010-07-02T00:29:45.593 回答
0
simply, convert € to an html entity € for the superfix (but you may get the issue with other special chars)
the other side of the problem (and more specifically) is check the mysql character_set_server and the most common cause character_set_client - seeAlso: connection charsets
also, it's important to note that the meta equiv makes no difference, you need to always set the header('Content-Type: ...)
于 2010-07-02T00:42:29.987 回答
0
于 2010-07-02T04:22:11.717 回答