Re: How to insert non-english characters to the db? - Mailing list pgsql-novice

From Tom Lane
Subject Re: How to insert non-english characters to the db?
Date
Msg-id 22408.1063119587@sss.pgh.pa.us
Whole thread Raw
In response to Re: How to insert non-english characters to the db?  (Andreas Fromm <Andreas.Fromm@physik.uni-erlangen.de>)
List pgsql-novice
Andreas Fromm <Andreas.Fromm@physik.uni-erlangen.de> writes:
> Tryed it out, but the initdb still fails:

> The database cluster will be initialized with locales:
>     COLLATE:  de_DE     CTYPE:   de_DE  MESSAGES: C
>     MONETARY: de_DE     NUMERIC: de_DE  TIME:     de_DE

> initializing pg_shadow... FATAL:  XX000: failed to initialize
> lc_messages to ""
> LOCATION:  InitializeGUCOptions, guc.c:1871

Hm.  After looking at the code a little bit, I think I was mistaken to
suppose there was something wrong with LC_MESSAGES in particular.
It looks like this is simply the first place that tries to set a locale
setting and checks the return value from setlocale().  So the most
likely theory is that *all* setlocale calls are failing, ie, there's
something broken about your system's locale configuration.

I don't know enough about locale stuff to know how to fix that;
you might try Tomka Gergely's advice to start with.

> In /etc/locale.gen there is nothing set, but shouldn't I be able to
> create a UTF-8-aware DB on a machine that doesn't have localisation
> support at all?

This is unrelated to your character-encoding desires.  You have a broken
system library that Postgres depends on.  It would still depend on it no
matter what -E value you ask for.

            regards, tom lane

pgsql-novice by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Modifying pg_shadow?
Next
From: Tom Lane
Date:
Subject: Re: Modifying pg_shadow?