Frank,<div><br></div><div>We seem to consider only a subset of the parameters (filenames and fileds) that should be utf8 encoded. But it seems that's not enough. For example treating fields as utf8 would also require to modify SetAttibuteFilter to provide match with the same value returned from GetFieldAsString. In this regard that would be more sufficient to treat all strings as being utf8 in GDAL. With regards to C# that would mean to convert all strings between Unicode and UTF8.</div>
<div><br></div><div>Best regards,</div><div><br></div><div>Tamas</div><div><br></div><div><br></div><div><br><br><div class="gmail_quote">2013/4/3 Frank Warmerdam <span dir="ltr"><<a href="mailto:warmerdam@pobox.com" target="_blank">warmerdam@pobox.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Guys,<div><br></div><div>Certainly the intention of RFC 23: </div><div><br></div><div> <a href="http://trac.osgeo.org/gdal/wiki/rfc23_ogr_unicode" target="_blank">http://trac.osgeo.org/gdal/wiki/rfc23_ogr_unicode</a><br>
</div>
<div><br></div><div>Was that we consider OGR string fields to be utf8 and I believe that should be the default assumption.</div><div><br></div><div>Best regards,</div><div>Frank</div><div><br>
</div></div><div class="gmail_extra"><div><div class="h5"><br><br><div class="gmail_quote">On Wed, Apr 3, 2013 at 12:17 PM, rburhum <span dir="ltr"><<a href="mailto:ragi@burhum.com" target="_blank">ragi@burhum.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello Tamas and Dennis,<br>
<br>
This is my personal opinion and there may tons of people that disagree, but<br>
I think it is more sane to always assume UTF8 encoding. There is<br>
functionality among the various drivers to accept/return strings in<br>
different encodings (through the CPL_Recode mechanism) but they all do it<br>
with different parameters (e.g. "PGCLIENTENCODING" in PostgreSQL,<br>
"SHAPE_ENCODING" in ESRI Shapefiles, etc). Overly complicated for<br>
programmatic access.<br>
<br>
Strings being set should use UTF8 encoding. Strings being read should assume<br>
UTF8 encoding. Not sure about the column names, layer names and such, but I<br>
would rather find the drivers that are not assuming utf8 and fix those than<br>
doing some extra complicated magic in the C# bindings. It simplifies logic<br>
greatly.<br>
<br>
If the underlying data store is using Windows-1252 encoding internally, that<br>
should be handled and abstracted out by the driver itself (by doing the<br>
conversions into utf8), not the bindings.<br>
<br>
My two cents,<br>
<br>
- Ragi<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://osgeo-org.1560.n6.nabble.com/gdal-dev-GDAL-OGR-C-wrapper-and-UTF8-tp5044028p5044395.html" target="_blank">http://osgeo-org.1560.n6.nabble.com/gdal-dev-GDAL-OGR-C-wrapper-and-UTF8-tp5044028p5044395.html</a><br>
<div>Sent from the GDAL - Dev mailing list archive at Nabble.com.<br>
</div><div><div>_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div></div></div><span class="HOEnZb"><font color="#888888">-- <br>---------------------------------------+--------------------------------------<br>I set the clouds in motion - turn up | Frank Warmerdam, <a href="mailto:warmerdam@pobox.com" target="_blank">warmerdam@pobox.com</a><br>
light and sound - activate the windows | <a href="http://pobox.com/~warmerdam" target="_blank">http://pobox.com/~warmerdam</a><br>and watch the world go round - Rush | Geospatial Software Developer<br>
</font></span></div>
<br>_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br></blockquote></div><br></div>