From: | "Florian G(dot) Pflug" <fgp(at)phlo(dot)org> |
---|---|
To: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
Cc: | nikolay(at)samokhvalov(dot)com, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: xml type and encodings |
Date: | 2007-01-15 16:33:25 |
Message-ID: | 45ABACD5.4050004@phlo.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Peter Eisentraut wrote:
> Am Montag, 15. Januar 2007 12:42 schrieb Nikolay Samokhvalov:
>> On 1/15/07, Peter Eisentraut <peter_e(at)gmx(dot)net> wrote:
>>> Client encoding is A, server encoding is B. Client sends an xml datum
>>> that looks like this:
>>>
>>> INSERT INTO table VALUES (xmlparse(document '<?xml version="1.0"
>>> encoding="C"?><content>...</content>'));
>>>
>>> Assuming that A, B, and C are all distinct, this could fail at a number
>>> of places.
>>>
>>> I suggest that we make the system ignore all encoding declarations in
>>> xml data. That is, in the above example, the string would actually
>>> have to be encoded in client encoding B on the client, would be
>>> converted to A on the server and stored as such. As far as I can tell,
>>> this is easily implemented and allowed by the XML standard.
>> In other words, in case when B != C server must trigger an error, right?
>
> No, C is ignored in all cases.
Would this mean that if the client_encoding is for example latin1, and I
retrieve an xml document uploaded by a client with client_encoding utf-8
(and thus having encoding="c" in the xml tag), that I would get a
document with latin1 encoding but saying that it's utf-8 in it's xml tag?
greetings, Florian Pflug
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2007-01-15 16:47:37 | Re: xml type and encodings |
Previous Message | Tom Lane | 2007-01-15 16:15:07 | Function execution costs 'n all that |