From: Hiroshi Inoue <inoue@tpf.co.jp>
To: Alvaro Herrera <alvherre@commandprompt.com>
Cc: ITAGAKI Takahiro <itagaki.takahiro@oss.ntt.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: Thu, 08 Jan 2009 06:47:38 +0900
Message-ID: <496522FA.6070805@tpf.co.jp> (raw)
In-Reply-To: <20090107132252.GB14891@alvh.no-ip.org>
References: <20081126174021.EFC6.52131E4D@oss.ntt.co.jp>
<492D1707.3060403@tpf.co.jp>
<20090107140111.810A.52131E4D@oss.ntt.co.jp>
<20090107132252.GB14891@alvh.no-ip.org>
Alvaro Herrera wrote:
> 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.
>
> shouldn't this use LC_TIME?
>
> + setlocale(LC_CTYPE, locale_time);
AFAIK the results of strftime() is determined by LC_TIME and
LC_CTYPE. Date/time representations by LC_TIME language are
converted to LC_CTYPE codeset. In fact I can see the Chinese
strftome() representaions by Japanese codeset fortunately.
Our goal is to convert LC_CTIME representaions to the database
encoding. Though we expected that wcsftime() doesn't rely on
LC_CTYPE, wcsftime() relies on LC_CTYPE because it is almost =
strftime() + mbstowcs() and a problem occured e.g. when the
LC_CTYPE is set to "C".
regards,
Hiroshi Inoue
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: inoue@tpf.co.jp, alvherre@commandprompt.com, itagaki.takahiro@oss.ntt.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: <496522FA.6070805@tpf.co.jp>
* 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