Re: [HACKERS] setlocale() on Windows is broken

2011-09-01 Thread Heikki Linnakangas
On 31.08.2011 16:05, Heikki Linnakangas wrote: While looking through old emails, I bumped into this: http://archives.postgresql.org/message-id/25219.1303306...@sss.pgh.pa.us To recap, setlocale() on Windows is broken for locale names that contain dots or apostrophes in the country name. That in

Re: [HACKERS] setlocale() and gettext on Windows revisited

2011-08-31 Thread Inoue, Hiroshi
HI all, (2011/09/01 4:30), Heikki Linnakangas wrote: Back in January/February, a patch was committed to avoid using libintl's version of setlocale: http://archives.postgresql.org/pgsql-hackers/2011-01/msg02628.php The comment says it was about a problem with printf() and friends, so I wonder,

[HACKERS] setlocale() and gettext on Windows revisited

2011-08-31 Thread Heikki Linnakangas
Back in January/February, a patch was committed to avoid using libintl's version of setlocale: http://archives.postgresql.org/pgsql-hackers/2011-01/msg02628.php The comment says it was about a problem with printf() and friends, so I wonder, why was that "#undef setlocale" line put inside the l

[HACKERS] setlocale() on Windows is broken

2011-08-31 Thread Heikki Linnakangas
While looking through old emails, I bumped into this: http://archives.postgresql.org/message-id/25219.1303306...@sss.pgh.pa.us To recap, setlocale() on Windows is broken for locale names that contain dots or apostrophes in the country name. That includes "Hong Kong S.A.R.", "Macau S.A.R.", and

Re: [HACKERS] setlocale and gettext in Postgres

2011-02-01 Thread Magnus Hagander
On Tue, Feb 1, 2011 at 12:08, Dave Page wrote: > On Tue, Feb 1, 2011 at 10:45 AM, Andrew Dunstan wrote: >> >> Why are we only disabling the macro for WIN32 and not for the other >> platforms that the macro is defined for? Do we know it's not also a problem >> on Apple or Cygwin? > > No, not as fa

Re: [HACKERS] setlocale and gettext in Postgres

2011-02-01 Thread Dave Page
On Tue, Feb 1, 2011 at 10:45 AM, Andrew Dunstan wrote: > > Why are we only disabling the macro for WIN32 and not for the other > platforms that the macro is defined for? Do we know it's not also a problem > on Apple or Cygwin? No, not as far as I know. -- Dave Page Blog: http://pgsnake.blogspot

Re: [HACKERS] setlocale and gettext in Postgres

2011-02-01 Thread Andrew Dunstan
On 02/01/2011 03:47 AM, Dave Page wrote: On Tue, Feb 1, 2011 at 8:29 AM, Magnus Hagander wrote: On Tue, Feb 1, 2011 at 09:08, Dave Page wrote: On Tue, Feb 1, 2011 at 5:36 AM, Itagaki Takahiro wrote: 2011/1/27 Hiroshi Inoue: I see now the following lines in libintl.h of version 0.18.1.1

Re: [HACKERS] setlocale and gettext in Postgres

2011-02-01 Thread Dave Page
On Tue, Feb 1, 2011 at 8:29 AM, Magnus Hagander wrote: > On Tue, Feb 1, 2011 at 09:08, Dave Page wrote: >> On Tue, Feb 1, 2011 at 5:36 AM, Itagaki Takahiro >> wrote: >>> 2011/1/27 Hiroshi Inoue : I see now the following lines in libintl.h of version 0.18.1.1 which didn't exist in 0.17

Re: [HACKERS] setlocale and gettext in Postgres

2011-02-01 Thread Magnus Hagander
On Tue, Feb 1, 2011 at 09:08, Dave Page wrote: > On Tue, Feb 1, 2011 at 5:36 AM, Itagaki Takahiro > wrote: >> 2011/1/27 Hiroshi Inoue : >>> I see now the following lines in libintl.h of version >>> 0.18.1.1 which didn't exist in 0.17 version. >>> >>> The macro may cause a trouble especially on Wi

Re: [HACKERS] setlocale and gettext in Postgres

2011-02-01 Thread Dave Page
On Tue, Feb 1, 2011 at 5:36 AM, Itagaki Takahiro wrote: > 2011/1/27 Hiroshi Inoue : >> I see now the following lines in libintl.h of version >> 0.18.1.1 which didn't exist in 0.17 version. >> >> The macro may cause a trouble especially on Windows. >> Attached is a patch to disable the macro on Win

Re: [HACKERS] setlocale and gettext in Postgres

2011-01-31 Thread Itagaki Takahiro
2011/1/27 Hiroshi Inoue : > I see now the following lines in libintl.h of version > 0.18.1.1 which didn't exist in 0.17 version. > > The macro may cause a trouble especially on Windows. > Attached is a patch to disable the macro on Windows. Can anyone test the fix? I added the patch to the curren

[HACKERS] setlocale and gettext in Postgres

2011-01-27 Thread Hiroshi Inoue
Hi all, I see now the following lines in libintl.h of version 0.18.1.1 which didn't exist in 0.17 version. /* Support for the locale chosen by the user. */ #if (defined __APPLE__ && defined __MACH__) || defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ #undef setlocale #define setlocale

Re: [HACKERS] setlocale

2003-10-08 Thread Peter Eisentraut
Andrew Dunstan writes: > At program startup, the equivalent of the following statement is executed: > setlocale( LC_ALL, "C" ); > Does this have any effect on us? No, that is just a peculiar way to express that by default nothing happens. > Does it mean, as it appears to, that the locale wil

[HACKERS] setlocale

2003-10-08 Thread Andrew Dunstan
The MS runtime docs on setlocale() contaiun the following statement: At program startup, the equivalent of the following statement is executed: setlocale( LC_ALL, "C" ); Does this have any effect on us? Does it mean, as it appears to, that the locale will not be inherited from the parent? If