postgresql正确的字符编码

时间:2017-03-09 20:55:49

标签: postgresql utf-8 doctrine-orm symfony

我在表中有一行定义为:

name character varying(255) NOT NULL

然而,使用symfony框架,当我尝试选择时,我得到以下错误,因为在一行中有一个“ü”字符。

[37;41m  An exception occurred while executing 'SELECT t0.id AS id_1, t0.name AS name_2, t0.description AS description_3, t0.type AS type_4, t0.parent_id AS parent_id_5 FROM postgres.categori
es t0  ←[39;49m
←[37;41m   WHERE t0.name = ? LIMIT 1' with params ["\x41\x6e\x7a\x81\x67\x65"]:
       ←[39;49m
←[37;41m  SQLSTATE[22021]: Character not in repertoire: 7 FEHLER:  ung├╝ltige Byte-Sequenz f├╝r Kodierung ┬╗UTF8┬½: 0x81

在教义中,dbal配置的字符集设置为UTF8。

我该如何纠正?即允许umlaut /ü字符

0 个答案:

没有答案