[英]CP1250 (WIN1250) encoding in Debian 8 Jessie
I have to install WIN1250 (CP1250; pl_PL.cp1250) encoding to my Debian 8 Jessie, but I have no idea how to do this. 我必须将WIN1250(CP1250; pl_PL.cp1250)编码安装到我的Debian 8 Jessie中,但是我不知道该怎么做。 I need this to initd Postgres database from external file (external company). 我需要这个来从外部文件(外部公司)初始化Postgres数据库。 When I try to initd this database I get error 当我尝试初始化此数据库时,出现错误
#/usr/lib/postgresql/9.5/bin/initdb -E WIN1250 -D /usr/local/phsql/data
The database cluster will be initialized with locale "pl_PL.UTF-8".
initdb:encoding mismatch
The encoding you selected (WIN1250) and the encoding that the selected locale uses (UTF8) do not match. This would lead to misbehavior in various character string processing functions. Rerun initdb and either do not specify and encoding explicitly, or choose a matching combination.
But I CAN'T rerun initdb without specify encoding, because external app have to connect to database WITH encoding WIN1250 :( 但是我不能在没有指定编码的情况下重新运行initdb,因为外部应用程序必须以WIN1250编码方式连接到数据库:(
Please, help me. 请帮我。
Okay I have a solution :) 好吧,我有一个解决方案:)
Have to edit /etc/locale.gen and /etc/locale.alias and just add pl_PL.CP1250 to it. 必须编辑/etc/locale.gen和/etc/locale.alias,然后将pl_PL.CP1250添加到其中。 Next you have to reconfigure locales by dpkg-recofigure locales. 接下来,您必须通过dpkg-recofigure语言环境重新配置语言环境。 And it works :) 它有效:)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.