Hi,

I will send a download link for you. I made conversion into GeoPackage which 
requires UTF8 encoding. In the following list OK means no warnings and 
correctly UTF encoded characters (åäöÅÄÖ) saved into gpkg database. In the "not 
a valid UTF-8" case I get warnings and non-ASCII characters are also written in 
a wrong way into GeoPackage.

OSGeo4W
.dbf with LDID "87 / 0x57" flag
ogr2ogr -f gpkg test.gpkg dr_linkki_k.shp
Result: OK
ogr2ogr -f gpkg test.gpkg dr_linkki_k.shp -oo encoding="ISO_8859-1"
Result: OK

.dbf without LDID "87 / 0x57" flag
ogr2ogr -f gpkg test.gpkg dr_linkki_k.shp
Result: "not a valid UTF-8 string" warnings
ogr2ogr -f gpkg test.gpkg dr_linkki_k.shp -oo encoding="ISO_8859-1"
Result: OK

Gisinternals build
.dbf with LDID "87 / 0x57" flag
ogr2ogr -f gpkg test.gpkg dr_linkki_k.shp
Result: OK
ogr2ogr -f gpkg test.gpkg dr_linkki_k.shp -oo encoding="ISO_8859-1"
Result: "not a valid UTF-8 string" warnings

.dbf without LDID "87 / 0x57" flag
ogr2ogr -f gpkg test.gpkg dr_linkki_k.shp
Result: "not a valid UTF-8 string" warnings
ogr2ogr -f gpkg test.gpkg dr_linkki_k.shp -oo encoding="ISO_8859-1"
Result: "not a valid UTF-8 string" warnings

-Jukka-
Lähettäjä: Even Rouault [mailto:[email protected]]
Lähetetty: 11. toukokuuta 2018 19:41
Vastaanottaja: [email protected]
Kopio: Rahkonen Jukka (MML) <[email protected]>
Aihe: Re: [gdal-dev] How to debug the shape open option "encoding"?


Jukka,



AFAIR there shouldn't be significant differences of behaviour in the shapefile 
driver between 2.2.4 and 2.3.0 . Can you share the problematic shapefile ?

>

> Is there anything else that an end user could do for finding out why the

> gisinternals build fails with recoding?



Probably not



> BTW is it documented somewhere

> which are the correct values for different encodings? For example in my

> case I had to use exactly "-oo encoding="ISO_8859-1".



This is the values supported by iconv. Might depend on iconv is compiled I 
guess.

But I'm a bit confused by your report. Did "-oo encoding="ISO_8859-1" worked 
despite the warnings ?



Even



--

Spatialys - Geospatial professional services

http://www.spatialys.com
_______________________________________________
gdal-dev mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to