From: Jorge Silva <jorge.silva93@gmail.com>
To: Pgsql-admin <pgsql-admin@lists.postgresql.org>
Subject: xPath in a database with LATIN1 encoding
Date: Sat, 24 Apr 2021 12:20:24 -0300
Message-ID: <E8EDD295-7797-4EC7-9F60-96A9554CDEE6@gmail.com> (raw)
Dear all,
We have a database, which is encoded with LATIN1, and we are adding some tables in it to store xml files with the “xml” type. After creating the table and populating it, we use the xPath function to retrieve some data from the XML, but it seems to not work properly, because it returns:
ERROR: could not parse XML document
DETAIL: line 1: Input is not proper UTF-8, indicate encoding !
Bytes: 0xE7 0xE3 0x6F 0x20
50550001974291546464219"><ide><cUF>31</cUF><cNF>54646421</cNF><natOp>Venda produ
The characters that it is not recognizing are both “ç” and “ã” because I think they are encoded differently in latin1 and utf-8. Is it possible to somehow use the xPath function with special characters in the XML and in a database which is not encoded with utf-8?
Thanks in advance.
Regards,
Jorge Luiz Moreira Silva
Polimet Indústria Metalúrgica EIRELI
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: jorge.silva93@gmail.com, pgsql-admin@lists.postgresql.org
Subject: Re: xPath in a database with LATIN1 encoding
In-Reply-To: <E8EDD295-7797-4EC7-9F60-96A9554CDEE6@gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox