[TriLUG] enable latin1 encoding for postgresql

Le C.T t.thanhcle at gmail.com
Fri Sep 3 17:01:42 EDT 2010


I figured this one out ..  I had to re-initdb with LATIN1 encoding enabled
..


initdb -D /../../../ -E LATIN1

then:
create database testdb1 with template=template0 encoding='LATIN1';



On Fri, Sep 3, 2010 at 2:57 PM, Le C.T <t.thanhcle at gmail.com> wrote:

> I am trying to create a database using 'Latin1' encoding with this psql
> command "*psql=# create database testdb1 with template=template0
> encoding='LATIN1'*"
>
> Got the error:
>
> ERROR:  encoding LATIN1 does not match locale en_US.UTF-8
> DETAIL:  The chosen LC_CTYPE setting requires encoding UTF8.
>
> Then, I tried:
>
> *psql=#set client_encoding to LATIN1;*
>
> Same error
>
>
> *$export LANG=en_US.iso88591*
>
> Same error
>
>
> Output of command '*locale -a*' does not show Latin1 (which I think is
> correct because it's a group of languages and should not show up here, but
> some of my colleagues said it should show up in that command)
>
> The server is running CentOS 5.4, 64-bit.
>
> Any help would be greatly appreciated.
>
> TIA,
> Thomas
>
>
>
>
>



More information about the TriLUG mailing list