Hiroshi Inoue wrote:
> >>>> I need someone with WIN32 experience to review and test this patch.
> >>> I don't understand why cache_locale_time() works on Windows. It sets
> >>> the LC_CTYPE but does not do any encoding coversion.
> >> Doesn't strftime_win32 do the conversion?
> > Oh, I now see strftime is redefined as a macro in that C files. Thanks.
> >>> Do month and
> >>> day-of-week names not work either, or do they work and the encoding
> >>> conversion for numeric/money, e.g. Euro, it not necessary?
> >> db_strdup does the conversion.
> > Should we pull the encoding conversion into a separate function and have
> > strftime_win32() and db_strdup() both call it?
> We may be able to pull the conversion WideChars => UTF8 =>
> a PG encoding into an function.
OK, I have created a new function, win32_wchar_to_db_encoding(), to
share the conversion from wide characters to the database encoding.
New patch attached.
> BTW both PGLC_localeconv() and cache_locale_time() save the current
> LC_CTYPE first and restore them just before returning the functions.
> I'm suspicious if it's OK when errors occur in middle of the functions.
Yea, I added a comment questioning if that is a problem.
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
PG East: http://www.enterprisedb.com/community/nav-pg-east-2010.do
In response to
pgsql-hackers by date
|Next:||From: Bruce Momjian||Date: 2010-03-02 18:30:15|
|Subject: Re: Re: Hot Standby query cancellation and
Streaming Replication integration|
|Previous:||From: Scott Bailey||Date: 2010-03-02 17:10:40|
|Subject: Re: to_timestamp() and quarters|
pgsql-general by date
|Next:||From: Ben Eliott||Date: 2010-03-02 18:22:17|
|Subject: createdb but revoke dropdb|
|Previous:||From: Chander Ganesan||Date: 2010-03-02 18:09:33|
|Subject: Re: The OS Command for pg_hotbackup -- Use lvmsnapshot instead
of tar cvzf|