Re: [HACKERS] Solve a problem of LC_TIME of windows.

2009-01-11 Thread Hiroshi Saito
Ops,my mistake in the mail thread.:-( sorry. === send the mistake other thread == Hi. My swift attack test was the MinGW environment. But, Inoue-san suggestion. 1. MinGW+gcc build HIROSHI=# set LC_TIME=Ja; SET HIROSHI=# select to_char(now(),'TMDay'); to_char - 日曜日 (1 行) HIROSHI=#

Re: [HACKERS] Solve a problem of LC_TIME of windows.

2009-01-09 Thread Magnus Hagander
ITAGAKI Takahiro wrote: Hiroshi Inoue in...@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

Re: [HACKERS] Solve a problem of LC_TIME of windows.

2009-01-09 Thread Hiroshi Saito
Hi. Thanks all. I tried CVS-HEAD now. HIROSHI=# select to_char(now(),'TMDay'); to_char -- Saturday (1 行) HIROSHI=# set LC_MESSAGES=Ja; SET HIROSHI=# select to_char(now(),'TMDay'); to_char -- Saturday (1 行)

Re: [HACKERS] Solve a problem of LC_TIME of windows.

2009-01-09 Thread Tom Lane
Hiroshi Saito z-sa...@guitar.ocn.ne.jp writes: HIROSHI=# set LC_MESSAGES=Ja; SET HIROSHI=# select to_char(now(),'TMDay'); to_char -- Saturday (1 行) I thought this was supposed to be driven by LC_TIME now, not LC_MESSAGES. regards, tom lane -- Sent via

Re: [HACKERS] Solve a problem of LC_TIME of windows.

2009-01-09 Thread Hiroshi Saito
I thought this was supposed to be driven by LC_TIME now, not LC_MESSAGES. Uga, yes yes! HIROSHI=# set LC_TIME=Ja; SET HIROSHI=# select to_char(now(),'TMDay'); to_char - 土曜日 (1 行) Thanks:-) -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your

Re: [HACKERS] Solve a problem of LC_TIME of windows.

2009-01-09 Thread Magnus Hagander
Hiroshi Saito wrote: I thought this was supposed to be driven by LC_TIME now, not LC_MESSAGES. Uga, yes yes! HIROSHI=# set LC_TIME=Ja; SET HIROSHI=# select to_char(now(),'TMDay'); to_char - 土曜日 (1 行) Thanks:-) Great! Thanks for testing! //Magnus -- Sent via

Re: [HACKERS] Solve a problem of LC_TIME of windows.

2009-01-08 Thread Hiroshi Inoue
ITAGAKI Takahiro wrote: Magnus Hagander mag...@hagander.net wrote: ITAGAKI Takahiro wrote: Ok, wcsftime() requries both LC_TIME and LC_CTYPE are the same setting (at least encoding) on Windows. Hmm. Is this actually cleaner than using the original method as suggested? Because if I

Re: [HACKERS] Solve a problem of LC_TIME of windows.

2009-01-07 Thread Alvaro Herrera
ITAGAKI Takahiro wrote: Hiroshi Inoue in...@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.

Re: [HACKERS] Solve a problem of LC_TIME of windows.

2009-01-07 Thread Magnus Hagander
ITAGAKI Takahiro wrote: Hiroshi Inoue in...@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

Re: [HACKERS] Solve a problem of LC_TIME of windows.

2009-01-07 Thread Hiroshi Inoue
ITAGAKI Takahiro wrote: Hiroshi Inoue in...@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

Re: [HACKERS] Solve a problem of LC_TIME of windows.

2009-01-07 Thread Hiroshi Saito
I've also thought a similar implementation but there seems a problem of efficiency. As far as I see wcsftime() is almost = strftime() + mbstowcs() and so using strftime() is effective at least for the following cases. 1) LC_CTIME is C. 2) LC_CTYPE != C and the database encoding != UTF-8. In

Re: [HACKERS] Solve a problem of LC_TIME of windows.

2009-01-07 Thread Hiroshi Inoue
Alvaro Herrera wrote: ITAGAKI Takahiro wrote: Hiroshi Inoue in...@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

Re: [HACKERS] Solve a problem of LC_TIME of windows.

2009-01-07 Thread ITAGAKI Takahiro
Magnus Hagander mag...@hagander.net wrote: ITAGAKI Takahiro wrote: Ok, wcsftime() requries both LC_TIME and LC_CTYPE are the same setting (at least encoding) on Windows. Hmm. Is this actually cleaner than using the original method as suggested? Because if I understand things right,

Re: [HACKERS] Solve a problem of LC_TIME of windows.

2009-01-06 Thread ITAGAKI Takahiro
Hiroshi Inoue in...@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