createdb - problem with encodings

Hi all,

I've got a strange problem with creating a new database:

br [at] ovh1:~$ createdb -E utf8 test
createdb: database creation failed: ERROR: encoding UTF8 does not
match server's locale en_US.utf8
DETAIL: The server's LC_CTYPE setting requires encoding LATIN1.

I've got some databases with UTF8 encoding and I have no idea why I
cannot create a new one now...

br [at] ovh1:~$ psql -l
List of databases
Name | Owner | Encoding
-------------+----------+----------
xxxxxxxx | br | UTF8
xxxxxxxxxx | br | UTF8
xxxxxxxxxx | br | UTF8
postgres | postgres | UTF8
template0 | postgres | UTF8
template1 | postgres | UTF8
(6 rows)

When I connect to any of them I can check my LC_CTYPE and my LC_COLLATE:

postgres=# show lc_ctype ;
lc_ctype
------------
en_US.utf8
(1 row)

postgres=# show lc_collate ;
lc_collate
------------
en_US.utf8
(1 row)

I can create a database with LATIN1 encoding. Why I cannot create a
new one with UTF8? Do you have any ideas?

I've read that doing initdb with correct locale may help. But what
should be the correct locale if not en_US.utf8??

Thank for any help,
Bartek

--
Sent via pgsql-admin mailing list (pgsql-admin [at] postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
bartlomiej.romanski [ Mo, 17 August 2009 20:32 ] [ ID #2012421 ]

Re: createdb - problem with encodings

Bart=C5=82omiej Roma=C5=84ski escribi=C3=B3:
> Hi all,
>
> I've got a strange problem with creating a new database:
>
> br [at] ovh1:~$ createdb -E utf8 test
> createdb: database creation failed: ERROR: encoding UTF8 does not
> match server's locale en_US.utf8
> DETAIL: The server's LC_CTYPE setting requires encoding LATIN1.

What's your operating system?

--
Alvaro Herrera http://www.CommandPrompt.co=
m/
The PostgreSQL Company - Command Prompt, Inc.

--
Sent via pgsql-admin mailing list (pgsql-admin [at] postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
Alvaro Herrera [ Mo, 17 August 2009 22:51 ] [ ID #2012422 ]

Re: createdb - problem with encodings

> What's your operating system?

Linux, Ubuntu Server 9.04

--
Sent via pgsql-admin mailing list (pgsql-admin [at] postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
bartlomiej.romanski [ Mo, 17 August 2009 22:54 ] [ ID #2012507 ]
Datenbanken » gmane.comp.db.postgresql.admin » createdb - problem with encodings

Vorheriges Thema: exporting schema from 64 bit install onto 32 bit
Nächstes Thema: Re: Just Forgot