Hi Mattias,
Sorry, but I cannot show rapidly you the question because I just remove manually any character that fail the test of xml wellformed response from our services.

I could try to prepare a testing project, but not just now.

However meanwhile I try to better explain the question:

There are two kind of potential problems in a response to a getcapabilites request:

Both come from the user that usually fill the fields using a copy/and/paste. from other kind of document. Please note that an abstract could be filled with more than one copy/paste from more document every one with its own Character-set (utf8, cp1252, and so on) so the abstract became a mix of text in several character-sets.

I know that if the text pasted is a true UTF8 all go perhaps better.
But when the user fill it using a copy/and/paste from a word document,
it is not using an UTF8 but instead a CP1252 in local language (italian, francais, english, or deutch language, every one with its own particular languages characters).
For us they are these:
òàùìè
but also the word microsoft: when the user copy/paste from it a text with inside a ' char, it became another char

’  char

This char could be acceptable if it was coded in a UT8, but if it is pasted from a word document in CP1252 it became an unaccptable document for some (perhaps for several) xml clients.

A second (but not secondary) question is also the potential use of XML restricted characters inside the text pasted.

An XML could be an utf-8 response, but however it cannot have any of the expecially characters of XML.

I guess for example to chars <, > , &

So if the user copy/paste a text like:

...The dataset is filtered using the rule [VAR] < 10.000.000

The char "<" if go to fail the response xml.

The better for xml client solution is to put the restricted char inside a CDATA section or escaping them. , of-course we could ask to the user to fill the abstract setting every restricted char inside a CDATA section, but actually QGIS say nothing for it , so the user don't know is it is pasting a text with some restricted char.

Hope to better explain the question.

Andrea.

Il 04/10/2015 15:30, Matthias Kuhn ha scritto:
Hi Andrea,

Is it really that there should only be 7bit characters or is it that the
encoding is not properly set in the answer?
XML fully supports utf-8 (it is even the default character encoding) and
I assume that in 2015 every modern XML client should support this as well.

Can you give an example server address and ideas of affected clients?

I have the feeling that there's something else fishy and if there is
really a need to replace characters above 127 then it should be an
opt-in configuration option.

Matthias

On 10/04/2015 11:59 AM, Andrea Peri wrote:
Hi,

we experienced this user case problem.

In the qgis-server getcapabilities response the information of the
"Abstract" is taken from the field:
layer-properties -> metadata -> Abstract.

But ofet the user fill this field with some cut/paste from other documents.
So doing, if fill this field with many unacceptable character.
Like these:

“ ” ’

or the very hard to see "no blank space".

The qgis accept all of this without any problem,
but when return the repsonse from a GetCapabiities request.

The response is not valid for the xml.
So many standard xml clients report a not well formed xml.

We don't have any good ideas to how resolve this issue.

My question is if could be possible in the qgis-server site to do a
xml conversion of all this character.
Instead of send them directly.

AFAIK all of this could be coded to be corected coded in a XML response.

Any thought on this ?

Thx.










_______________________________________________
Qgis-user mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/qgis-user

_______________________________________________
Qgis-user mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/qgis-user

Reply via email to