Re: XML only working in UTF-8 - Re: 8.4 open items list
От | Sergey Burladyan |
---|---|
Тема | Re: XML only working in UTF-8 - Re: 8.4 open items list |
Дата | |
Msg-id | 87y6ucakr1.fsf@seb.progtech.ru обсуждение исходный текст |
Ответ на | Re: XML only working in UTF-8 - Re: 8.4 open items list (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-hackers |
Tom Lane <tgl@sss.pgh.pa.us> writes: > 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. There is another issue (from sql.ru forum): seb=> select xmlelement(name язык, xmlattributes('русский' as "значение")); xmlelement ----------------------------------------------------------------------<язык значение="русский"/> xmlattributes always encode non-latin text as html entities server_encoding UTF8 client_encoding UTF8 This is strange behavior of libxml... i can't find documentation about this. http://www.xmlsoft.org/examples/testWriter.c use xmlTextWriterStartDocument and set output encoding with it. Without it, all non-latin nodes and it values written correctly (it is UTF-8), except attribute value, this is strange, imho. xmltype * xmlelement(XmlExprState *xmlExpr, ExprContext *econtext) from xml.c not use xmlTextWriterStartDocument and return html entities in attribute values. -- Sergey Burladyan
В списке pgsql-hackers по дате отправления: