ODOO 12编码Latin1无法解析



我在Ubuntu 18.04上使用安装脚本odoo odoo install安装了odoo12服务器成功启动,并在尝试创建第一个数据库时,以下错误显示了。

数据库创建错误:编码" utf8"不匹配" en_us"详细信息:所选的lc_ctype设置需要编码" latin1"。

然后,我运行了以下脚本,该脚本已在ODOO 10上解决了问题。它是从 Postgres 用户运行的

psql postgres -c "update pg_database set datallowconn = TRUE where datname = 'template0';"
psql template0 -c "update pg_database set datistemplate = FALSE where datname = 'template1';"
psql template0 -c "drop database template1;"
psql template0 -c "create database template1 with ENCODING = 'UTF-8' LC_CTYPE = 'en_US.utf8' LC_COLLATE = 'en_US.utf8' template = template0;"
psql template0 -c "update pg_database set datistemplate = TRUE where datname = 'template1';"
psql template1 -c "update pg_database set datallowconn = FALSE where datname = 'template0';"

由于问题持续,我安装了phppgadmin,并注意到编码仍然是" Latin1";因此,我使用同一名称和相同所有者从phppgadmin界面手动创建了一个新数据库。以下是phppgadmin的镜头phppgadmin shot屏幕

仍然没有解决的问题,误差如下所示。ODOO编码错误消息

注意这是我服务器上调用"语言环境"的返回。语言环境状态

您必须在Postgres安装之前配置语言环境。

export LC_CTYPE="en_US.UTF-8"
sudo dpkg-reconfigure locales

或者您可以重新启动DB

initdb --pgdata=/path/to/postgresql -E utf8

最新更新