Re: [PATCH] Add CANONICAL option to xmlserialize - Mailing list pgsql-hackers

From Jim Jones
Subject Re: [PATCH] Add CANONICAL option to xmlserialize
Date
Msg-id a8c617dd-b9ed-10ec-b8e5-103536cde1a1@uni-muenster.de
Whole thread Raw
In response to Re: [PATCH] Add CANONICAL option to xmlserialize  (Jim Jones <jim.jones@uni-muenster.de>)
Responses Re: [PATCH] Add CANONICAL option to xmlserialize
List pgsql-hackers
On 06.03.23 11:50, I wrote:
> I guess this confusion is happening because xml_parse() was being 
> called with the database encoding from GetDatabaseEncoding().
>
> I added a condition before calling xml_parse() to check if the xml 
> document has a different encoding than UTF-8
>
> parse_xml_decl(xml_text2xmlChar(data), NULL, NULL, &encodingStr, NULL);
> encoding = encodingStr ? xmlChar_to_encoding(encodingStr) : PG_UTF8;
>
> doc = xml_parse(data, XMLOPTION_DOCUMENT, false, encoding, NULL);

It seems that this bug fix didn't change the output of the CI on Debian 
+ Meson, 32bit.

I slightly changed the test case to a character that both encodings can 
deal with.

v3 attached.

Attachment

pgsql-hackers by date:

Previous
From: vignesh C
Date:
Subject: Re: Support logical replication of DDLs
Next
From: Nazir Bilal Yavuz
Date:
Subject: Re: meson: Optionally disable installation of test modules