Re: possible encoding issues with libxml2 functions
Pavel Stehule <pavel.stehule@gmail.com>
From: Pavel Stehule <pavel.stehule@gmail.com>
To: Noah Misch <noah@leadboat.com>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2017-08-19T20:53:19Z
Lists: pgsql-hackers
Attachments
- xpath-encoding-nonutf8-support.patch (text/x-patch) patch
Hi I am sending some POC - it does support XPATH and XMLTABLE for not UTF8 server encoding. In this case, all strings should be converted to UTF8 before call libXML2 functions, and result should be converted back from UTF8. I found some previous experiments https://marc.info/?l=pgsql-bug s&m=123407176408688 Note: I got some information so used xmlNodeDump function is deprecated - so we should to replace it too sometime. Regards Pavel
Commits
-
Ignore XML declaration in xpath_internal(), for UTF8 databases.
- d8406b9de910 9.3.21 landed
- 2f4061aff504 9.4.16 landed
- e7083dfce575 9.5.11 landed
- 46fb15f48a2d 9.6.7 landed
- 30a5e940ac9a 10.2 landed
- 2918fcedbf2b 11.0 landed
-
Add warning that xpath() doesn't work with non-UTF8 data.
- 14180f921493 8.4.0 cited