pg.ddx.io  pgsql-patches@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Magnus Hagander <magnus@hagander.net>
To: ITAGAKI Takahiro <itagaki.takahiro@oss.ntt.co.jp>
Cc: Hiroshi Inoue <inoue@tpf.co.jp>
Cc: Hiroshi Saito <z-saito@guitar.ocn.ne.jp>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: Solve a problem of LC_TIME of windows.
Date: Wed, 07 Jan 2009 14:25:01 +0100
Message-ID: <4964AD2D.7060009@hagander.net> (raw)
In-Reply-To: <20090107140111.810A.52131E4D@oss.ntt.co.jp>
References: <20081126174021.EFC6.52131E4D@oss.ntt.co.jp>
	<492D1707.3060403@tpf.co.jp>
	<20090107140111.810A.52131E4D@oss.ntt.co.jp>

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...

Hmm. Is this actually cleaner than using the original method as
suggested? Because if I understand things right, that version did *not*
require the setting of LC_CTYPE? (this is the version that uses strftime
and does two conversions)

//Magnus




view thread (45+ messages)  latest in thread

Message-ID: <4964AD2D.7060009@hagander.net>
Permalink:  ../4964AD2D.7060009@hagander.net/
Also on:    postgresql.org/message-id/4964AD2D.7060009@hagander.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-patches@postgresql.org
  Cc: magnus@hagander.net, itagaki.takahiro@oss.ntt.co.jp, inoue@tpf.co.jp, z-saito@guitar.ocn.ne.jp, pgsql-hackers@postgresql.org
  Subject: Re: Solve a problem of LC_TIME of windows.
  In-Reply-To: <4964AD2D.7060009@hagander.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox