Error in XML recv function

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Error in XML recv function
Date: 2017-02-20 13:40:26
Message-ID: CAFj8pRDt_j53xJm3UXn7XrZV0X56rMqgjpGGBkVYygX6_=iXzw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi

When I did tests of own XML import functions I found a strange error.

I successfully imported XML to PostgreSQL. This document is readable
without any visual defects. But when I tested this document against any
libxml2 function I found a error -

ERROR: could not parse XML document
DETAIL: input conversion failed due to input error, bytes 0x88 0x3C 0x2F
0x72
line 1: switching encoding: encoder error

When I debug this document I found a inconsistency between encoding info
and data. Recv correctly ensure encoding from cp1250 encoding to UTF8. But
the encoding info stays without any change and shows cp1250 still. Then
libxml2 functions fails.

Regards

Pavel

Attachment Content-Type Size
enpr6.xml text/xml 120 bytes

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2017-02-20 13:45:55 Re: powerpc(32) point/polygon regression failures on Debian Jessie
Previous Message Andres Freund 2017-02-20 13:24:28 Re: How to read a value when it is VARATT EXTERNAL ONDISK from logical replication decoder