initdb - encoding question

Started by Josh Harrisonover 18 years ago7 messagesgeneral
Jump to latest
#1Josh Harrison
joshques@gmail.com

Hi
Im tying to initialize the cluster using initdb and encoding 'UTF8'
initdb -E UTF8 -D /export/home/josh/postgres8.3/pgsql/data

But I get this error
The files belonging to this database system will be owned by user "josh".
This user must also own the server process.

The database cluster will be initialized with locales
COLLATE: en_CA.ISO8859-1
CTYPE: en_CA.ISO8859-1
MESSAGES: C
MONETARY: en_CA.ISO8859-1
NUMERIC: en_CA.ISO8859-1
TIME: C
initdb: encoding mismatch
The encoding you selected (UTF8) and the encoding that the
selected locale uses (LATIN1) do not match. This would lead to
misbehavior in various character string processing functions.
Rerun initdb and either do not specify an encoding explicitly,
or choose a matching combination.

Why do I get this error? How can I solve this?
Thanks
josh

#2brian
brian@zijn-digital.com
In reply to: Josh Harrison (#1)
Re: initdb - encoding question

Josh Harrison wrote:

Hi
Im tying to initialize the cluster using initdb and encoding 'UTF8'
initdb -E UTF8 -D /export/home/josh/postgres8.3/pgsql/data

But I get this error
The files belonging to this database system will be owned by user "josh".
This user must also own the server process.

The database cluster will be initialized with locales
COLLATE: en_CA.ISO8859-1
CTYPE: en_CA.ISO8859-1
MESSAGES: C
MONETARY: en_CA.ISO8859-1
NUMERIC: en_CA.ISO8859-1
TIME: C
initdb: encoding mismatch
The encoding you selected (UTF8) and the encoding that the
selected locale uses (LATIN1) do not match. This would lead to
misbehavior in various character string processing functions.
Rerun initdb and either do not specify an encoding explicitly,
or choose a matching combination.

Why do I get this error? How can I solve this?
Thanks
josh

ISO8859-1 is "latin 1". Try using en_CA.utf-8 instead.

brian

#3Josh Harrison
joshques@gmail.com
In reply to: brian (#2)
Re: initdb - encoding question

initdb -E en_CA.utf-8 -D /export/home/sjothirajah/postgres8.3/pgsql/data
gives this error
initdb: "en_CA.utf-8" is not a valid server encoding name

Thanks
josh

On Dec 3, 2007 1:01 PM, brian <brian@zijn-digital.com> wrote:

Show quoted text

Josh Harrison wrote:

Hi
Im tying to initialize the cluster using initdb and encoding 'UTF8'
initdb -E UTF8 -D /export/home/josh/postgres8.3/pgsql/data

But I get this error
The files belonging to this database system will be owned by user

"josh".

This user must also own the server process.

The database cluster will be initialized with locales
COLLATE: en_CA.ISO8859-1
CTYPE: en_CA.ISO8859-1
MESSAGES: C
MONETARY: en_CA.ISO8859-1
NUMERIC: en_CA.ISO8859-1
TIME: C
initdb: encoding mismatch
The encoding you selected (UTF8) and the encoding that the
selected locale uses (LATIN1) do not match. This would lead to
misbehavior in various character string processing functions.
Rerun initdb and either do not specify an encoding explicitly,
or choose a matching combination.

Why do I get this error? How can I solve this?
Thanks
josh

ISO8859-1 is "latin 1". Try using en_CA.utf-8 instead.

brian

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

#4brian
brian@zijn-digital.com
In reply to: Josh Harrison (#3)
Re: initdb - encoding question

Josh Harrison wrote:

initdb -E en_CA.utf-8 -D /export/home/sjothirajah/postgres8.3/pgsql/data
gives this error
initdb: "en_CA.utf-8" is not a valid server encoding name

My bad. Use UTF-8.

brian

#5Peter Eisentraut
peter_e@gmx.net
In reply to: Josh Harrison (#1)
Re: initdb - encoding question

Am Montag, 3. Dezember 2007 schrieb Josh Harrison:

initdb -E UTF8 -D /export/home/josh/postgres8.3/pgsql/data

The database cluster will be initialized with locales
COLLATE: en_CA.ISO8859-1
CTYPE: en_CA.ISO8859-1
MESSAGES: C
MONETARY: en_CA.ISO8859-1
NUMERIC: en_CA.ISO8859-1
TIME: C
initdb: encoding mismatch
The encoding you selected (UTF8) and the encoding that the
selected locale uses (LATIN1) do not match. This would lead to
misbehavior in various character string processing functions.
Rerun initdb and either do not specify an encoding explicitly,
or choose a matching combination.

Why do I get this error?

It's an encoding mismatch. The encoding you selected (UTF8) and the encoding
that the selected locale uses (LATIN1) do not match. This would lead to
misbehavior in various character string processing functions.

How can I solve this?

Rerun initdb and either do not specify an encoding explicitly, or choose a
matching combination.

--
Peter Eisentraut
http://developer.postgresql.org/~petere/

#6Peter Eisentraut
peter_e@gmx.net
In reply to: Josh Harrison (#3)
Re: initdb - encoding question

Am Montag, 3. Dezember 2007 schrieb Josh Harrison:

initdb -E en_CA.utf-8 -D /export/home/sjothirajah/postgres8.3/pgsql/data
gives this error
initdb: "en_CA.utf-8" is not a valid server encoding name

The option name you want is --locale, not -E.

--
Peter Eisentraut
http://developer.postgresql.org/~petere/

#7Stephane Bortzmeyer
bortzmeyer@nic.fr
In reply to: Josh Harrison (#1)
Re: initdb - encoding question

On Mon, Dec 03, 2007 at 12:51:27PM -0500,
Josh Harrison <joshques@gmail.com> wrote
a message of 63 lines which said:

The encoding you selected (UTF8) and the encoding that the
selected locale uses (LATIN1) do not match.

Indeed.

Rerun initdb and either do not specify an encoding explicitly, or
choose a matching combination.

That's the right solution.

% initdb --encoding=UTF8 --locale=fr_FR.UTF8

If you read French, see
http://www.bortzmeyer.org/postgresql-unicode.html