Re: Solve a problem of LC_TIME of windows. - Mailing list pgsql-hackers

From Magnus Hagander
Subject Re: Solve a problem of LC_TIME of windows.
Date
Msg-id 49674B7F.1030307@hagander.net
Whole thread Raw
In response to Re: Solve a problem of LC_TIME of windows.  (ITAGAKI Takahiro <itagaki.takahiro@oss.ntt.co.jp>)
List pgsql-hackers
ITAGAKI Takahiro wrote:
> Hiroshi Inoue <inoue@tpf.co.jp> wrote:
> 
>> Seems LC_CTYPE and LC_TIME should be convertible even though we use
>> wcsftime (which internally calls strftime?).
> 
> Ok, wcsftime() requries both LC_TIME and LC_CTYPE are the same setting
> (at least encoding) on Windows.
> 
> The attached patch is an updated version to fix cache_locale_time().
> Now it sets LC_TIME and LC_CTYPE to the specified locale and restore
> them at end of the function. I tested the patch on Windows XP Japanese
> Edition (SJIS) with UTF-8 and EUCJP databases, and worked expectedly.
> 
> "#ifdef WIN32" codes seems to be ugly in the patch,
> but I have no other idea...

I have applied this version of the patch (with only a minor further
addition to the comment).

Thank you all for your work and patience in getting this fixed! Let's
hope it stays fixed :-)

//Magnus


pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: Hot standby, slot ids and stuff
Next
From: Simon Riggs
Date:
Subject: Re: Hot standby, slot ids and stuff