Re: [PATCHES] Solve a problem of LC_TIME of windows. - Mailing list pgsql-hackers

From Hiroshi Saito
Subject Re: [PATCHES] Solve a problem of LC_TIME of windows.
Date
Msg-id A32F4AB7D95646B3A358002E1FB73F9C@HIRO57887DE653
Whole thread Raw
In response to Re: [PATCHES] Solve a problem of LC_TIME of windows.  (ITAGAKI Takahiro <itagaki.takahiro@oss.ntt.co.jp>)
List pgsql-hackers
Hi ITAGAKI-san.

Sorry, very late reaction..
I lost time resources in an individual my machine trouble and busyness.:-(
Now, I appreciate your exact work. ! Then, I desire the best patch for PostgreSQL. 
Probably, I think that it is finally helpful in not a problem of only Japan but many countries. 
Tom-san, and  Alvaro-san, Magnus-san understands the essence of  this problem. 
Therefore, the suggestion is expected for me. 

Anyway, thank you very much.!!

Regards,
Hiroshi Saito

----- Original Message ----- 
From: "ITAGAKI Takahiro" <itagaki.takahiro@oss.ntt.co.jp>


> 
> "Jaime Casanova" <jcasanov@systemguards.com.ec> wrote:
> 
>> i'm confused, original patch has this signature:
>> + conv_strftime(char *src, size_t len, const char *format, const struct tm *tm)
>> your's has:
>> +strftime_win32(char *dst, size_t dstlen, const char *format, const
> 
>> you change all src for dst, just a variable name decision but a
>> radical one... why was that (i honestly doesn't understand this patch
>> very well ;)?
> 
> That's because the first argument is not an input buffer,
> but an output buffer. MSDN also calls it 'strDest'.
>    http://msdn.microsoft.com/en-us/library/fe06s4ak(VS.71).aspx
> Linux manpage calls it 's', but I think it means String, not Src.
>    http://man.cx/strftime
> 
> If you can review the patch, please use the attached one instead.
> I modified it in response to the discussion of pg_do_encoding_conversion.
> 
> 
> BTW, I cannot understand the comment in the function head,
> 
> + * result is obtained by locale setup of LC_TIME in the environment 
> + * of windows at present CP_ACP. Therefore, conversion is needed
> + * for SERVER_ENCODING. SJIS which is not especially made to server 
> + * encoding in Japan returns. 
> 
> but it probably says:
> 
> ----
> strftime in Windows returns in CP_ACP encoding, but it could be
> different from SERVER_ENCODING. Especially, Windows Japanese edition
> requires conversions because it uses SJIS as CP_ACP, but we don't
> support SJIS as a server encoding.
> ----
> 
> I hope you would review my English not only C ;-)
> 
> Regards,
> ---
> ITAGAKI Takahiro
> NTT Open Source Software Center
> 
>


pgsql-hackers by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: usermap regexp support
Next
From: Ron Mayer
Date:
Subject: Interval code refactoring patch (Was: Re: Patch for ISO-8601-Interval Input and output.)