Thread: WIN1251 localization

WIN1251 localization

From
Yuriy Rusinov
Date:

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.

Re: WIN1251 localization

From
Adrian Klaver
Date:
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


Re: WIN1251 localization

From
Yuriy Rusinov
Date:
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.

Re: WIN1251 localization

From
Adrian Klaver
Date:
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


Re: WIN1251 localization

From
Petko Godev
Date:
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



Re: WIN1251 localization

From
Petko Godev
Date:
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



Re: WIN1251 localization

From
Yuriy Rusinov
Date:
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.