[TinyOWS-dev] About encoding per layer and other things
boolean10001 at yahoo.com
Tue Feb 1 17:27:26 EST 2011
I was checking about the per layer encoding.
First, when I've added the encoding attribute in the config.xml file, it was to
be able to pull data from
the server with the GetFeature request.
This because I noticed that Quantum GIS wasn't loading my data complete. Doing
some tests with
the GetFeature request with a browser, there was a parsing error with no UTF-8
That problem was now fixed with the changes I made, you can check at
to see that the TinyOWS generated XML response handles the encoding ISO-8859-1
defined into my config.xml file.
Also, if you type ./wfst2 --check it dumps the encoding too:
TinyOWS version: 0.9.0
Config File Path: /usr/local/tinyows/config.xml
PostGIS dsn: host=127.0.0.1 ...
Schema dir: /usr/local/tinyows/schema/
Log file: /usr/local/tinyows/tinyows.log
- public.acatic_manzanas -> 32613 RW
- public.acatic_cultivos -> 32613 RW
- public.acatic_curvas_nivel_maestras -> 32613 RW
Now, handling encoding per layer needs to specify per table PostgreSQL
encodings, is not possible
because you can only set the encoding to the whole database.
Also, there's no necessarily match between the XML encoding and the PostgreSQL
I need to handle the XML responses with an encoding that supports french and
characters, so I have to choose ISO-8859-1, but, I have my database configured
or WIN1252. It doesn't match.
So I suggest to add into the pg tag an encoding attribute, like this:
<pg host="127.0.0.1" user="postgres" password="postgres"
dbname="tinyows_demo" port="5432" encoding="LATIN-1"/>
With this change, I just can call the PQsetClientEncoding function after the
What do you think ?
There's another thing I'm seeing with the transaction code. It will be wise to
use SELECT ... WITH
UPDATE specification and also adding LOCKs while update or delete rows, to avoid
However, this change might affect a little bit the performance (because the
locks) but enhancing the
I'm currently doing some tests with that.
IC Carlos Ruiz
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the TinyOWS-dev