Tom Lane <t...@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
----------------------------------------------------------------------
 <язык значение="&#x440;&#x443;&#x441;&#x441;&#x43A;&#x438;&#x439;"/>

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

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to