TM format can mix encodings in to_char()

Поиск
Список
Период
Сортировка
От Juan José Santamaría Flecha
Тема TM format can mix encodings in to_char()
Дата
Msg-id CAC+AXB22So5aZm2vZe+MChYXec7gWfr-n-SK-iO091R0P_1Tew@mail.gmail.com
обсуждение исходный текст
Ответы Re: TM format can mix encodings in to_char()  (Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>)
Re: TM format can mix encodings in to_char()  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Hackers,

I will use as an example the code in the regression test 'collate.linux.utf8'.
There you can find:

SET lc_time TO 'tr_TR';
SELECT to_char(date '2010-04-01', 'DD TMMON YYYY');
   to_char   
-------------
 01 NIS 2010
(1 row)

The problem is that the locale 'tr_TR' uses the encoding ISO-8859-9 (LATIN5),
while the test runs in UTF8. So the following code will raise an error:

SET lc_time TO 'tr_TR';
SELECT to_char(date '2010-02-01', 'DD TMMON YYYY');
ERROR:  invalid byte sequence for encoding "UTF8": 0xde 0x75

The problem seems to be in the code touched in the attached patch.

Regards,

Juan Jose Santamaria Flecha
Вложения

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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: Reducing the runtime of the core regression tests
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Attempt to consolidate reading of XLOG page