[gdal-dev] Launder=yes and Spatialite driver
even.rouault at mines-paris.org
Sat Jan 21 03:50:55 EST 2012
Le jeudi 19 janvier 2012 11:34:05, Jukka Rahkonen a écrit :
> Spatialite driver document http://gdal.org/ogr/drv_sqlite.html says about
> Layer Creation Option LAUNDER
> LAUNDER=yes/no: Controls whether layer and field names will be laundered
> for easier use in SQLite. Laundered names will be convered to lower case
> and some special characters will be changed to underscores.
I've added in the doc that the default value for this option is YES.
> What are the special characters which are laundered? It looks like the
> Scandinavian characters åäöÅÄÖ are not on the list.
The special characters currently laundered are : single quote ('), minus (-),
sharp (#). As far as converting to lower case, it is done by the tolower() C
function which in most cases will only work for the ASCII set of characters.
It is definitely not UTF8 ready. So the scandinavian characters will probably
be not changed as you have noted it.
> Here is a litte
> Spatialite database which is created with the -lco LAUNDER=yes option.
> Attributes names which åäöÅÄÖ characters does not look the same any longer
> but they do not have underscores either. Database can be used with GDAL
> without problems as it is, but Spatialite-gui is showing those attribute
> names as empty.
> I solved the problem this time by editing the column names in the source
> data but it might be good to know in the future what gets laundered and
> what not.
I guess this is due to the column names not being UTF-8 (I see
randomvesist�_nimi_s with ogrinfo in the console).
On which OS did you create that database ? I've just tested the following on
ogr2ogr test.sqlite -f sqlite poly.shp -sql "select 'äÄ' as 'äÄ' from poly" -
(where poly.shp is a random shapefile)
The UTF-8 characters are not laundered and are correctly displayed in
If you tried on Windows, I guess you are affected by the encoding issues you
have already experimented with the WFS driver.
> -Jukka Rahkonen-
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
More information about the gdal-dev