createdb - problem with encodings
createdb - problem with encodings
От:
Bartłomiej Romański <bartlomiej.romanski@gmail.com>
Дата:
Hi all,
I've got a strange problem with creating a new database:
br@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@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
Re: createdb - problem with encodings
От:
Alvaro Herrera <alvherre@commandprompt.com>
Дата:
Bartłomiej Romański escribió: > Hi all, > > I've got a strange problem with creating a new database: > > br@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.com/ The PostgreSQL Company - Command Prompt, Inc.