Re: Solve a problem of LC_TIME of windows.

From: Hiroshi Inoue <inoue(at)tpf(dot)co(dot)jp>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: ITAGAKI Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>, Hiroshi Saito <z-saito(at)guitar(dot)ocn(dot)ne(dot)jp>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Solve a problem of LC_TIME of windows.
Date: 2009-01-07 21:47:38
Message-ID: 496522FA.6070805@tpf.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Alvaro Herrera wrote:
> ITAGAKI Takahiro wrote:
>> Hiroshi Inoue <inoue(at)tpf(dot)co(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2009-01-07 21:48:17 Re: [COMMITTERS] pgsql: Adjust things so that the query_string of a cached plan and the
Previous Message Simon Riggs 2009-01-07 21:41:55 Re: Latest version of Hot Standby patch

Browse pgsql-patches by date

  From Date Subject
Next Message ITAGAKI Takahiro 2009-01-08 02:54:36 Re: Solve a problem of LC_TIME of windows.
Previous Message Hiroshi Saito 2009-01-07 16:44:31 Re: Solve a problem of LC_TIME of windows.