Re: Fix for 8.3 MSVC locale (Was [HACKERS] NLS on MSVC strikes back!)

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Fix for 8.3 MSVC locale (Was [HACKERS] NLS on MSVC strikes back!)
Дата
Msg-id 20080214223542.GC15085@alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: Fix for 8.3 MSVC locale (Was [HACKERS] NLS on MSVC strikes back!)  ("Gevik Babakhani" <pgdev@xs4all.nl>)
Ответы Re: Fix for 8.3 MSVC locale (Was [HACKERS] NLS on MSVC strikes back!)  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Fix for 8.3 MSVC locale (Was [HACKERS] NLS on MSVCstrikes back!)  ("Gevik Babakhani" <pgdev@xs4all.nl>)
Список pgsql-patches
Gevik Babakhani wrote:

> gevik=# set lc_messages to 'Spanish_Spain';
> SET
> gevik=# select to_char((current_date + s.a),'TMDay TMMonth YYYY') as dates from generate_series(0,6) as s(a);
>          dates
> -----------------------
>  Jueves Febrero 2008
>  Viernes Febrero 2008
>  Sbado Febrero 2008
>  Domingo Febrero 2008
>  Lunes Febrero 2008
>  Martes Febrero 2008
>  Mircoles Febrero 2008
> (7 rows)

Hmm, interestingly you lost the diacritics here.  The output is mangled
for Saturday and Wednesday, which should read "Sábado" and "Miércoles"
respectively.

It is not good that the system allows you to output invalidly encoded
data.  What happens if you try setting lc_messages to
Spanish_Spain.65001 instead?

Ideally, it should be an error to set lc_messages to a value that's not
compatible with the current encoding.  Do we do that currently elsewhere?

(Perhaps this is not a problem with your patch, but rather a problem
that's worth fixing separately.)

--
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

В списке pgsql-patches по дате отправления:

Предыдущее
От: "Gevik Babakhani"
Дата:
Сообщение: Re: Fix for 8.3 MSVC locale (Was [HACKERS] NLS on MSVC strikes back!)
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Fix for 8.3 MSVC locale (Was [HACKERS] NLS on MSVC strikes back!)