我将 cakephp 与 SQL Server 2012 一起使用。在我的数据库中,我声明了 nvarchar 而不是 varchar 来显示 unicode。但是当我使用
$this->set('types',$this->Manager->query('select * from product_types'))
结果是:
Array
(
[0] => Array
(
[0] => Array
(
[id] => 2
[name] => Th?c u?ng c� c?n
)
)
[1] => Array
(
[0] => Array
(
[id] => 3
[name] => B�nh k?o
)
)
[2] => Array
(
[0] => Array
(
[id] => 4
[name] => X� b�ng
)
)
[3] => Array
(
[0] => Array
(
[id] => 5
[name] => H�ng h�a d�ng h?p
)
)
)
它不显示 unicode 字符。