Re: [pgsql-hackers-win32] Win32 & NLS - Mailing list pgsql-patches

From Tom Lane
Subject Re: [pgsql-hackers-win32] Win32 & NLS
Date
Msg-id 10159.1098041466@sss.pgh.pa.us
Whole thread Raw
In response to Re: [pgsql-hackers-win32] Win32 & NLS  ("Magnus Hagander" <mha@sollentuna.net>)
List pgsql-patches
"Magnus Hagander" <mha@sollentuna.net> writes:
> Test program attached, results below. It returns NULL for
> whatever I try with LC_MESSAGES.

It looks like LC_MESSAGES just plain does not work on Windows.  I did
some googling and found some pages suggesting this, for instance

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclib/html/_crt_setlocale.2c_._wsetlocale.asp

The patch you suggest looks remarkably ugly; in particular it is
generally unsafe to pass a local variable to putenv.  Perhaps that
does not matter on Windows but I wonder whether the putenv part couldn't
just be dropped.  And why bother with ZeroMemory?

            regards, tom lane

pgsql-patches by date:

Previous
From: Andrew Dunstan
Date:
Subject: windows progname / regression fixes
Next
From: "Magnus Hagander"
Date:
Subject: Re: [pgsql-hackers-win32] Win32 & NLS