Re: Solve a problem of LC_TIME of windows.
От
Magnus Hagander
Тема
Re: Solve a problem of LC_TIME of windows.
Дата
Msg-id
4964AD2D.7060009@hagander.net
Ответ на
Re: Solve a problem of LC_TIME of windows. (ITAGAKI Takahiro)
Список
Дерево обсуждения
Re: Solve a problem of LC_TIME of windows. "Hiroshi Saito" <z-saito@guitar.ocn.ne.jp>
Re: Solve a problem of LC_TIME of windows. Tom Lane <tgl@sss.pgh.pa.us>
ITAGAKI Takahiro wrote: > Hiroshi Inoue 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 version to fix cache_locale_time(). > Now it sets LC_TIME and LC_CTYPE to the specified locale and restore > them at end of the function. I tested the patch on Windows XP Japanese > Edition (SJIS) with UTF-8 and EUCJP databases, and worked expectedly. > > "#ifdef WIN32" codes seems to be ugly in the patch, > but I have no other idea... Hmm. Is this actually cleaner than using the original method as suggested? Because if I understand things right, that version did *not* require the setting of LC_CTYPE? (this is the version that uses strftime and does two conversions) //Magnus
В списке pgsql-hackers по дате отправления