From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jorge Silva <jorge.silva93@gmail.com>
Cc: Pgsql-admin <pgsql-admin@lists.postgresql.org>
Subject: Re: xPath in a database with LATIN1 encoding
Date: Sat, 24 Apr 2021 12:49:21 -0400
Message-ID: <1707307.1619282961@sss.pgh.pa.us> (raw)
In-Reply-To: <E8EDD295-7797-4EC7-9F60-96A9554CDEE6@gmail.com>
References: <E8EDD295-7797-4EC7-9F60-96A9554CDEE6@gmail.com>
Jorge Silva <jorge.silva93@gmail.com> writes:
> 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?
I don't have a lot of expertise in this area, but I think you need
an explicit encoding indicator in the xml header, a la
<?xml encoding="latin1"?> ...
On the whole, the xml type is definitely easier to use with database
encoding set to utf8. I think you'll be paying for encoding conversion
every time we interact with libxml, for instance.
regards, tom lane
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: tgl@sss.pgh.pa.us, jorge.silva93@gmail.com, pgsql-admin@lists.postgresql.org
Subject: Re: xPath in a database with LATIN1 encoding
In-Reply-To: <1707307.1619282961@sss.pgh.pa.us>
* 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