Skip site navigation (1) Skip section navigation (2)

Re: Solve a problem of LC_TIME of windows.

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Hiroshi Saito <z-saito(at)guitar(dot)ocn(dot)ne(dot)jp>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: Solve a problem of LC_TIME of windows.
Date: 2008-09-24 09:11:41
Message-ID: 48DA044D.10005@hagander.net (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
Hiroshi Saito wrote:
> Hi.
> 
> I have problem of LC_TIME of windows.(CVS-HEAD)
> 
> As for Version 8.3.3. It is edited by wrong gettext and is. (But, it is
> expressed.)
> http://winpg.jp/~saito/pg_work/LC_MESSAGE_CHECK/LC_TIME_PATCH/pg8.3.3-to_char_gettext_format.png
> 
> 
> As for Version 8.4. It came to be used by Tom-san in strftime of
> Native-windowsAPI.
> It is good improvement.! But, strftime of Native returns a result by
> CODEPAGE of
> environment of operation by Windows with LC_TIME. In Japanese
> environment, return
> value is SJIS(CP932). Then, SJIS(CP932) can't be chosen by
> SERVER_ENCODING.:-(
> http://winpg.jp/~saito/pg_work/LC_MESSAGE_CHECK/pg84beta-03-to_char.png
> 
> Then, I'm proposal patch. It is solved splendidly.
> http://winpg.jp/~saito/pg_work/LC_MESSAGE_CHECK/LC_TIME_PATCH/DATECHECK_EUCJP.txt
> 
> http://winpg.jp/~saito/pg_work/LC_MESSAGE_CHECK/LC_TIME_PATCH/DATECHECK_UTF8.txt

In principle, I think this patch looks good.

Do you (or somebody else) have an example where this breaks in an
encoding where I can actually understand the characters, though ;-) That
would make testing a whole lot easier...

Also, the patch needs error checking. strftime() can fail, and the
multibyte conversion functions can certainly fail. That will need to be
added.

//Magnus

In response to

Responses

pgsql-hackers by date

Next:From: Simon RiggsDate: 2008-09-24 12:48:45
Subject: Re: [PATCHES] Subtransaction commits and Hot Standby
Previous:From: Magnus HaganderDate: 2008-09-24 09:02:55
Subject: Re: [HACKERS] 0x1A in control file on Windows

pgsql-patches by date

Next:From: Simon RiggsDate: 2008-09-24 12:48:45
Subject: Re: [PATCHES] Subtransaction commits and Hot Standby
Previous:From: Simon RiggsDate: 2008-09-23 21:47:11
Subject: Re: Subtransaction commits and Hot Standby

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group