xPath in a database with LATIN1 encoding - Mailing list pgsql-admin

From Jorge Silva
Subject xPath in a database with LATIN1 encoding
Date
Msg-id E8EDD295-7797-4EC7-9F60-96A9554CDEE6@gmail.com
Whole thread Raw
Responses Re: xPath in a database with LATIN1 encoding  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: xPath in a database with LATIN1 encoding  (Peter Eisentraut <peter.eisentraut@enterprisedb.com>)
List pgsql-admin
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

pgsql-admin by date:

Previous
From: Jayson Hreczuck
Date:
Subject: Re: Order of removing logical replication
Next
From: Tom Lane
Date:
Subject: Re: xPath in a database with LATIN1 encoding