Re: [PATCH] Add CANONICAL option to xmlserialize
Jim Jones <jim.jones@uni-muenster.de>
From: Jim Jones <jim.jones@uni-muenster.de>
To: Thomas Munro <thomas.munro@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2023-03-06T13:19:43Z
Lists: pgsql-hackers
Attachments
- v3-0001-Add-CANONICAL-format-to-xmlserialize.patch (text/x-patch) patch v3-0001
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.