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

From: ITAGAKI Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>
To: "Hiroshi Saito" <z-saito(at)guitar(dot)ocn(dot)ne(dot)jp>
Cc: "pgsql-hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCHES] Solve a problem of LC_TIME of windows.
Date: 2008-11-04 01:41:09
Message-ID: 20081104094301.7EE8.52131E4D@oss.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Hello, Saito-san:

"Hiroshi Saito" <z-saito(at)guitar(dot)ocn(dot)ne(dot)jp> wrote:
> next patch is this.

I'm reviewing your patch and cleanup some parts:
- Avoid casting to LPWSTR.
- Use pre-defined MAX_L10N_DATA instead of STRLEN_MAX.
I'll send a new version.

BTW, we convert strings multiple times in the function.
Windows mbcs -> UTF16 -> UTF8 -> server_encoding

If we have 100% compatible encoding with Windows,
we could skip UTF16 and UTF8 conversions. i.e,

buflen = strftime(buffer);
result = pg_do_encoding_conversion(buffer, buflen,
GetPlatformEncoding(), GetDatabaseEncoding());

Is it possible to implement GetPlatformEncoding() ?
I think it is also needed to treat non-ascii file path
in COPY, LOAD, archive_command and so on.

Regards,
---
ITAGAKI Takahiro
NTT Open Source Software Center

Attachment Content-Type Size
strftime_win32.patch application/octet-stream 1.7 KB
result_sjis.txt application/octet-stream 891 bytes

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2008-11-04 02:22:36 Re: [WIP] In-place upgrade
Previous Message Tom Lane 2008-11-04 01:27:37 Re: [WIP] In-place upgrade

Browse pgsql-patches by date

  From Date Subject
Next Message Jaime Casanova 2008-11-06 04:47:29 Re: Fwd: [PATCHES] Auto Partitioning Patch - WIP version 1
Previous Message Hiroshi Saito 2008-11-02 05:20:48 Re: [PATCHES] Solve a problem of LC_TIME of windows.