Re: how can i change encoding in template1 DB? - Mailing list pgsql-general

From Adrian Klaver
Subject Re: how can i change encoding in template1 DB?
Date
Msg-id 200912121147.02438.aklaver@comcast.net
Whole thread Raw
In response to how can i change encoding in template1 DB?  (Nando67 <xxx.yyy@zzz.it>)
Responses Re: how can i change encoding in template1 DB?  (Nando67 <xxx@yyy.zz>)
List pgsql-general
On Saturday 12 December 2009 5:32:34 am Nando67 wrote:
> I installed postgresql by pacman (i'm using an ArchLinux Distr)
> the default encoding of template1 is SQL_ASCII, i want to change this
> one with UTF8 encoding
>
> i try to use ALTER DATABASE but this statemanent hasn't the clause
> encoding (while the CREATE DATABASE has it) so i can't modify the
> template1 db by this one.
>
> how can i do it?
>
> many thanks
>
> nando

First I would run the locale command.
Ex:
aklaver@tucker:~$ locale
LANG=en_US.UTF-8
LANGUAGE=en
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=


Then I would read the Notes section of:
http://www.postgresql.org/docs/8.4/interactive/sql-createdatabase.html
There is a description of the various issues that can arise with the interaction
of database encoding and locale settings.

Then I would post here again to ask about your preferred db encoding and if it
is possible with the locale information from the first step.

--
Adrian Klaver
aklaver@comcast.net

pgsql-general by date:

Previous
From: Scott Marlowe
Date:
Subject: Re: how can i change encoding in template1 DB?
Next
From: Nando67
Date:
Subject: Re: how can i change encoding in template1 DB?