Re: xml type and encodings

Поиск
Список
Период
Сортировка
От Florian G. Pflug
Тема Re: xml type and encodings
Дата
Msg-id 45ABC2E7.4070108@phlo.org
обсуждение исходный текст
Ответ на Re: xml type and encodings  (Peter Eisentraut <peter_e@gmx.net>)
Ответы Re: xml type and encodings  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-hackers
Peter Eisentraut wrote:
> Am Montag, 15. Januar 2007 17:33 schrieb Florian G. Pflug:
>> 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?
> 
> That is likely to be a consequence of this proposed behaviour, but no doubt 
> not a nice one.

Couldn't the server change the encoding declaration inside the xml to 
the correct
one (the same as client_encoding) before returning the result?
Otherwise, parsing the xml on the client with some xml library becomes 
difficult, because the library is likely to get confused by the wrong 
encoding tag - and you can't even fix that by using the correct client
encoding, because you don't know what the encoding tag says until you 
have retrieved the document...

greetings, Florian Pflug



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Function execution costs 'n all that
Следующее
От: Magnus Hagander
Дата:
Сообщение: Re: [GENERAL] Checkpoint request failed on version 8.2.1.