CP1250 (WIN1250) encoding in Debian 8 Jessie



我必须安装win1250(cp1250; pl_pl.cp1250)编码为我的debian 8 jessie,但我不知道该怎么做。我需要从外部文件(外部公司)来到Initd Postgres数据库。当我尝试启动此数据库时,我会得到错误

#/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.

但是我无法在没有指定编码的情况下重新运行initdb,因为外部应用必须使用编码Win1250连接到数据库:(

请帮助我。

好吧,我有一个解决方案:)

必须编辑/etc/locale.gen和/etc/locale.alias,然后向其添加pl_pl.cp1250。接下来,您必须通过dpkg-recofigure Locales重新配置语言环境。它有效:)

最新更新