简体   繁体   English

Debian 8 Jessie中的CP1250(WIN1250)编码

[英]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.

相关问题 在Debian 8.5 jessie上安装postgresql-9.5-postgis-2.2时出错 - Error with installing postgresql-9.5-postgis-2.2 on Debian 8.5 jessie 在Debian 8.6 Jessie上启动PostgreSQL 11的Docker构建权限问题 - Docker build permission problem starting PostgreSQL 11 on Debian 8.6 Jessie 无法在树莓派3(OS:Debian Jessie)上下载Postgresql 9.6.1版本 - Not able to download Postgresql 9.6.1 version on raspberry pi 3 (OS : Debian Jessie) Debian Jessie上的Postgres 9.0文件系统级备份 - Postgres 9.0 File System level backup on Debian Jessie PostgreSQL中的CP852编码 - CP852 encoding in postgresql Postgres使用cp1252编码吗? - Postgres using cp1252 encoding? SSIS错误“ UTF8”在编码“ WIN1252”中没有等效项 - SSIS error “UTF8” has no equivalant in encoding “WIN1252” 编码为 UTF8 的字符在 WIN1252 中没有等价物 - Character with encoding UTF8 has no equivalent in WIN1252 Postgres:具有字节序列编码“ UTF8”的字符在WIN1252中没有等效的编码 - Postgres :character with Byte sequence in encoding “UTF8” has no equivalent encoding in WIN1252 编码“WIN1252”中字节序列为 0x9d 的字符在编码“UTF8”中没有等效项 - Character with byte sequence 0x9d in encoding 'WIN1252' has no equivalent in encoding 'UTF8'
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM