Skip site navigation (1) Skip section navigation (2)

Re: [PATCHES] Win32 & NLS

From: "Magnus Hagander" <mha(at)sollentuna(dot)net>
To: "Peter Eisentraut" <peter_e(at)gmx(dot)net>,<pgsql-hackers-win32(at)postgresql(dot)org>,"pgsql-patches" <pgsql-patches(at)postgresql(dot)org>
Subject: Re: [PATCHES] Win32 & NLS
Date: 2004-10-17 16:16:22
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers-win32pgsql-patches
>> Which appears to suggest that we should change the locale using
>> putenv() etc, and not using setlocale() at all... Because setlocale()
>> does not support LC_MESSAGES, probably.
>This cannot possibly work.  putenv() doesn't change any locale.  The 
>environment variables only serve as a default when you call 
>without an actual locale value.  But to enable any locale, you always 
>need to call setlocale() somehow, somewhere.

That was my first thought, too. But it *does* appear to work.

With this patch, I can change lc_messages from
environment-before-startup, from postgresql.conf or using "set
The only main thing I see as being wrong is that it cannot check if the
specified messages were incorrect. If I literally set it to "foo", I get
english without getting any error/warning.

Clearly they don't just serve as defaults on win32. That's the only
conclusion I can draw from the fact that this works, and from the
questions in the FAQ referenced.

See also for example


pgsql-patches by date

Next:From: Tom LaneDate: 2004-10-17 17:19:16
Subject: Re: Nearing final release?
Previous:From: Peter EisentrautDate: 2004-10-17 15:47:19
Subject: Re: [PATCHES] Win32 & NLS

pgsql-hackers-win32 by date

Next:From: Magnus HaganderDate: 2004-10-17 16:37:16
Subject: Re: postgres win32 in FAT32
Previous:From: Peter EisentrautDate: 2004-10-17 15:47:19
Subject: Re: [PATCHES] Win32 & NLS

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group