WIN1251 localization

Started by Yuriy Rusinovalmost 13 years ago7 messagesgeneral
Jump to latest
#1Yuriy Rusinov
yrusinov@gmail.com

Hello, All !

I am developing database. Initial scripts contains information in win1251
encoding. Now I have received problem

c_db1=# \encoding WIN1251
WIN1251: invalid encoding name or conversion procedure not found
c_db1=#

locale in system was defined by this
$ sudo localedef -c -i ru_RU -f CP1251 ru_RU.CP1251

$locale -a | grep ru
ru_RU.cp1251
ru_RU.utf8
ru_UA.utf8

system ubuntu linux 11.10, where is an error and how to correct this ?

--
Best regards,
Sincerely yours,
Yuriy Rusinov.

#2Adrian Klaver
adrian.klaver@aklaver.com
In reply to: Yuriy Rusinov (#1)
Re: WIN1251 localization

On 06/15/2013 02:16 AM, Yuriy Rusinov wrote:

Hello, All !

I am developing database. Initial scripts contains information in
win1251 encoding. Now I have received problem

c_db1=# \encoding WIN1251
WIN1251: invalid encoding name or conversion procedure not found
c_db1=#

locale in system was defined by this
$ sudo localedef -c -i ru_RU -f CP1251 ru_RU.CP1251

$locale -a | grep ru
ru_RU.cp1251
ru_RU.utf8
ru_UA.utf8

system ubuntu linux 11.10, where is an error and how to correct this ?

What version of Postgres?

What is the database server encoding set to?

--
Best regards,
Sincerely yours,
Yuriy Rusinov.

--
Adrian Klaver
adrian.klaver@gmail.com

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#3Yuriy Rusinov
yrusinov@gmail.com
In reply to: Adrian Klaver (#2)
Re: WIN1251 localization

Postgres 9.1

utf-8

On Sat, Jun 15, 2013 at 5:53 PM, Adrian Klaver <adrian.klaver@gmail.com>wrote:

On 06/15/2013 02:16 AM, Yuriy Rusinov wrote:

Hello, All !

I am developing database. Initial scripts contains information in
win1251 encoding. Now I have received problem

c_db1=# \encoding WIN1251
WIN1251: invalid encoding name or conversion procedure not found
c_db1=#

locale in system was defined by this
$ sudo localedef -c -i ru_RU -f CP1251 ru_RU.CP1251

$locale -a | grep ru
ru_RU.cp1251
ru_RU.utf8
ru_UA.utf8

system ubuntu linux 11.10, where is an error and how to correct this ?

What version of Postgres?

What is the database server encoding set to?

--
Best regards,
Sincerely yours,
Yuriy Rusinov.

--
Adrian Klaver
adrian.klaver@gmail.com

--
Best regards,
Sincerely yours,
Yuriy Rusinov.

#4Adrian Klaver
adrian.klaver@aklaver.com
In reply to: Yuriy Rusinov (#3)
Re: WIN1251 localization

On 06/15/2013 12:04 PM, Yuriy Rusinov wrote:

Postgres 9.1

utf-8

How was Postgres installed?

Is there more than one instance of Postgres on the machine?

The conversion should be possible, so it would seem either the
conversion library is not there or it cannot be found by the server.

--
Best regards,
Sincerely yours,
Yuriy Rusinov.

--
Adrian Klaver
adrian.klaver@gmail.com

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#5Petko Godev
petko@godev.org
In reply to: Yuriy Rusinov (#3)
Re: WIN1251 localization

On Sat, Jun 15, 2013 at 11:04:28PM +0400, Yuriy Rusinov wrote:

Postgres 9.1

utf-8

Is this the system locale or the pgcluster encoding? What is the output of the
pg_lsclusters?

Consider the utf8 convertion of those initial scripts if this is not an
option, then just create new cluster with cp1251 encoding.

Regards
--
Petko Godev

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#6Petko Godev
petko+pgsql@godev.org
In reply to: Yuriy Rusinov (#3)
Re: WIN1251 localization

On Sat, Jun 15, 2013 at 11:04:28PM +0400, Yuriy Rusinov wrote:

Postgres 9.1

utf-8

Is this the system locale or the pgcluster encoding? What is the output of the
pg_lsclusters?

Consider the utf8 convertion of those initial scripts if this is not an
option, then just create new cluster with cp1251 encoding.

Regards
--
Petko Godev

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#7Yuriy Rusinov
yrusinov@gmail.com
In reply to: Petko Godev (#6)
Re: WIN1251 localization

Hello !

Sorry for delay. Yes there are two version of postgresql 8.4 and 9.1 and
suddenly all begin to work properly. pg_lsclusters output is

Version Cluster Port Status Owner Data directory
Log file
8.4 main 5432 down postgres /var/lib/postgresql/8.4/main
/var/log/postgresql/postgresql-8.4-main.log
9.1 main 5433 online postgres /var/lib/postgresql/9.1/main
/var/log/postgresql/postgresql-9.1-main.log

Best regards,
Sincerely yours,
Yuriy Rusinov.