Обсуждение: Locales problems with debian sarge3.1

Поиск
Список
Период
Сортировка

Locales problems with debian sarge3.1

От
Amédée
Дата:
Hello,

I saw lot of topics treating about the subject, but nowhere i found
real solutions. Has the bug been fixed?

# set  >
 LANG=fr_FR
LANGUAGE=fr_FR:fr
LC_ALL=C
LC_MESSAGES=C


Before initialising DB I fixed these variables :
(I don't use -E option of initdb)

export LC_ALL=C
export LANG="fr_FR.UTF-8"

Before launching application I fixed these variables :

export LC_ALL=C
export LANG="fr_FR"

Do i have to fix environment variables in postgres.conf?

And eventually , when attempting to DB , I have this:

waiting for postmaster to start....FATAL:  invalid value for parameter
"lc_messages": "fr_FR.UTF-8"

Who ask lc_message to associated to fr_FR.UTF-8 ?
Is there a way to make it valid value?
Have I made wrong variable association?
Is there a generic option to make postgres to work?

Thanks


Regards,

Re: Locales problems with debian sarge3.1

От
Martijn van Oosterhout
Дата:
On Thu, Jan 12, 2006 at 06:15:23PM +0100, Amédée wrote:
> Hello,
>
> I saw lot of topics treating about the subject, but nowhere i found
> real solutions. Has the bug been fixed?

<snip>

> Before initialising DB I fixed these variables :
> (I don't use -E option of initdb)
>
> export LC_ALL=C
> export LANG="fr_FR.UTF-8"
>
> Before launching application I fixed these variables :
>
> export LC_ALL=C
> export LANG="fr_FR"
>
> Do i have to fix environment variables in postgres.conf?

No, you have to initdb again.

> And eventually , when attempting to DB , I have this:
>
> waiting for postmaster to start....FATAL:  invalid value for parameter
> "lc_messages": "fr_FR.UTF-8"
>
> Who ask lc_message to associated to fr_FR.UTF-8 ?

When you initialise a cluster it remembers the locale you created it
under and uses that for everything. Apparently you got rid of the
locale at some stage? It wouldn't have let you initdb with a
non-existant locale.

> Is there a way to make it valid value?

Add it to /etc/locale.gen and rerun locale-gen

> Have I made wrong variable association?
> Is there a generic option to make postgres to work?

Either create the locale, or initdb with a locale that exists.

Hope this helps,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

Вложения