Re: How to insert non-english characters to the db?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andreas Fromm <Andreas(dot)Fromm(at)physik(dot)uni-erlangen(dot)de>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: How to insert non-english characters to the db?
Date: 2003-09-09 14:59:47
Message-ID: 22408.1063119587@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Andreas Fromm <Andreas(dot)Fromm(at)physik(dot)uni-erlangen(dot)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

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Tom Lane 2003-09-09 15:27:47 Re: Modifying pg_shadow?
Previous Message Bruce Momjian 2003-09-09 13:59:15 Re: Modifying pg_shadow?