Re: XML only working in UTF-8 - Re: 8.4 open items list

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: XML only working in UTF-8 - Re: 8.4 open items list
Дата
Msg-id 4110.1238973350@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: XML only working in UTF-8 - Re: 8.4 open items list  (Peter Eisentraut <peter_e@gmx.net>)
Ответы Re: XML only working in UTF-8 - Re: 8.4 open items list  (Sergey Burladyan <eshkinkot@gmail.com>)
Список pgsql-hackers
Peter Eisentraut <peter_e@gmx.net> writes:
> On Sunday 05 April 2009 05:00:04 Tom Lane wrote:
>> Is there a reason not to fix it as suggested at
>> http://archives.postgresql.org/pgsql-bugs/2009-02/msg00032.php
>> ie recode on-the-fly from database encoding to UTF8?

> Probably just verifying that it works.

I studied this patch a bit and I'm unimpressed.  It looks to me like
xml.c is absolutely chock-full of places where we pass DB-encoding
data to libxml, or vice versa.  The patch only fixes a few of them,
and does so in a fairly ugly, ad-hoc fashion with lots of duplicated
code.

As near as I can tell, every place where you see an explicit cast
between char * and xmlChar * is probably broken.  I think we ought
to approach this by refactoring to have all those conversions go
through subroutines, instead of blithely casting.

This is more work than I personally care to put into xml.c.  Any
takers?
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Solaris getopt_long and PostgreSQL
Следующее
От: James Pye
Дата:
Сообщение: Re: Python 3.0 does not work with PL/Python