<div>Hi,</div><div><br></div><div>I managed to resolve this issue by recreating my database with the locale set to is<span class="Apple-style-span" style="font-family: &#39;courier new&#39;, monospace; font-size: 13px; border-collapse: collapse; ">_IS.UTF-8 </span>(Icelandic, the native locale for the data) - </div>

<div><br></div><div>I can imagine though, that it still might be useful to be able to set the <span class="Apple-style-span" style="font-family: monospace; font-size: 13px; ">PG_CLIENT_ENCODING </span>through tinyOWS before querying postgis, since dumping a database and recreating it in a different locale is anything but trivial if you have a large database. </div>

<div><br></div><div>I just got lucky that I only need tinyOWS for a small subset of my data - which I had already put into its own database beforehand.</div><div><br></div><div>But thanks anyway and best regards from Reykjavík,</div>

<div>Gissur Þórhallsson</div><br><div class="gmail_quote">2010/9/10 Gissur Þórhallsson <span dir="ltr">&lt;<a href="mailto:gissur@loftmyndir.is">gissur@loftmyndir.is</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

The database I&#39;m working against returns the following:<div><div><font face="&#39;courier new&#39;, monospace">Encoding:  UTF8</font></div><div><font face="&#39;courier new&#39;, monospace">Collation: en_US.UTF-8</font></div>



<div><font face="&#39;courier new&#39;, monospace">Ctype:     en_US.UTF-8</font></div><div><br></div><div>Maybe that en_US prefix is what&#39;s giving me problems, though I&#39;ve been using that collation/CType for over two years now against geoserver and php with little problem.</div>


<div><br></div><div>A request to tinyOWS gives the following from the log:</div>
<div><div><font face="&#39;courier new&#39;, monospace"><div>&lt;wfs:GetFeature xmlns:wfs=&quot;<a href="http://www.opengis.net/wfs" target="_blank">http://www.opengis.net/wfs</a>&quot; service=&quot;WFS&quot; version=&quot;1.0.0&quot; outputFormat=&quot;application/json&quot; </div>



<div>xsi:schemaLocation=&quot;<a href="http://www.opengis.net/wfs" target="_blank">http://www.opengis.net/wfs</a> <a href="http://schemas.opengis.net/wfs/1.0.0/WFS-transaction.xsd" target="_blank">http://schemas.opengis.net/wfs/1.0.0/WFS-transaction.xsd</a> <a href="http://www.redacted.url/" target="_blank">http://www.redacted.url/</a> <a href="http://www.redacted.url/cgi-bin/tinyows?service=wfs&amp;request=DescribeFeatureType&amp;version=1.1.0&amp;typename=postgis:raektunarspildur" target="_blank">http://www.redacted.url/cgi-bin/tinyows?service=wfs&amp;amp;request=DescribeFeatureType&amp;amp;version=1.1.0&amp;amp;typename=postgis:raektunarspildur</a>&quot; </div>



<div>xmlns:xsi=&quot;<a href="http://www.w3.org/2001/XMLSchema-instance" target="_blank">http://www.w3.org/2001/XMLSchema-instance</a>&quot;&gt;</div><div><span style="white-space:pre-wrap">        </span>&lt;wfs:Query typeName=&quot;feature:raektunarspildur&quot; xmlns:feature=&quot;<a href="http://www.redacted.url/" target="_blank">http://www.redacted.url/</a>&quot;&gt;</div>



<div><span style="white-space:pre-wrap">                </span>&lt;ogc:Filter xmlns:ogc=&quot;<a href="http://www.opengis.net/ogc" target="_blank">http://www.opengis.net/ogc</a>&quot;&gt;</div><div><span style="white-space:pre-wrap">                        </span>&lt;ogc:BBOX&gt;</div>



<div><span style="white-space:pre-wrap">                                </span>&lt;ogc:PropertyName&gt;</div><div><span style="white-space:pre-wrap">                                        </span>the_geom</div><div><span style="white-space:pre-wrap">                                </span>&lt;/ogc:PropertyName&gt;</div>



<div><span style="white-space:pre-wrap">                                </span>&lt;gml:Box xmlns:gml=&quot;<a href="http://www.opengis.net/gml" target="_blank">http://www.opengis.net/gml</a>&quot; srsName=&quot;EPSG:3057&quot;&gt;</div><div><span style="white-space:pre-wrap">                                        </span>&lt;gml:coordinates decimal=&quot;.&quot; cs=&quot;,&quot; ts=&quot; &quot;&gt;</div>



<div><span style="white-space:pre-wrap">                                                </span>375814.67365644,573990.42956723 378933.22752796,576477.51155755</div><div><span style="white-space:pre-wrap">                                        </span>&lt;/gml:coordinates&gt;</div>
<div><span style="white-space:pre-wrap">                                </span>&lt;/gml:Box&gt;</div><div><span style="white-space:pre-wrap">                        </span>&lt;/ogc:BBOX&gt;</div><div><span style="white-space:pre-wrap">                </span>&lt;/ogc:Filter&gt;</div>



<div><span style="white-space:pre-wrap">        </span>&lt;/wfs:Query&gt;</div><div>&lt;/wfs:GetFeature&gt;</div></font></div></div><div><br></div>Kind regards from Iceland,</div><div>Gissur</div><div><div><div></div><div class="h5">

<br><div class="gmail_quote">

On Thu, Sep 9, 2010 at 4:30 PM, Olivier Courtin <span dir="ltr">&lt;<a href="mailto:olivier.courtin@gmail.com" target="_blank">olivier.courtin@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



<br>
On Sep 9, 2010, at 5:34 PM, Gissur Þórhallsson wrote:<br>
<br>
Hi Gissur,<br>
<div><br>
&gt; I have tinyOWS up and running (under Apache running on ubuntu 8.0.4<br>
&gt; LTS) against<br>
&gt; OpenLayers and it works fine geometry-wise, but when it comes to<br>
&gt; attribute values<br>
&gt; containing non-standard characters those characters get all garbled,<br>
&gt; while it all looks<br>
&gt; okay on the postgis side.<br>
<br>
<br>
</div>I&#39;m not that sure to fully understand yet where you problem occur,<br>
<br>
Could you activate the tinyows log and send here the content of the log<br>
related to your problematic query<br>
<br>
Could you also indicate in which encoding your postgresql datase are<br>
(with psql -l command)<br>
<br>
Tks,<br>
<div><br>
<br>
&gt; The response from tinyOWS states that it&#39;s using UTF-8, but I wanted<br>
&gt; to experiment and<br>
&gt; force it to return iso-8859-1 for instance, but I can&#39;t figure out<br>
&gt; how to make it do that - am<br>
&gt; I missing something frightfully obvious?<br>
<br>
</div>Right now there&#39;s no such a feature as UTF-8 is supposed to be a<br>
correct answer<br>
for everyone in the world... :)<br>
<font color="#888888"><br>
--<br>
Olivier<br>
_______________________________________________<br>
TinyOWS-users mailing list<br>
<a href="mailto:TinyOWS-users@lists.maptools.org" target="_blank">TinyOWS-users@lists.maptools.org</a><br>
<a href="http://lists.maptools.org/mailman/listinfo/tinyows-users" target="_blank">http://lists.maptools.org/mailman/listinfo/tinyows-users</a><br>
</font></blockquote></div><br><br clear="all"><br></div></div>-- <br><div class="im">Gissur Þórhallsson<br><br>Loftmyndir ehf.<br>Laugavegur 13<br>IS 101 Reykjavík - Iceland<br>sími (tel): (+354) 540 2500<br>tölvupóstur (email): <a href="mailto:gissur@loftmyndir.is" target="_blank">gissur@loftmyndir.is</a><br>




</div></div>
</blockquote></div><br><br clear="all"><br>-- <br>Gissur Þórhallsson<br><br>Loftmyndir ehf.<br>Laugavegur 13<br>IS 101 Reykjavík - Iceland<br>sími (tel): (+354) 540 2500<br>tölvupóstur (email): <a href="mailto:gissur@loftmyndir.is">gissur@loftmyndir.is</a><br>