Some providers of ESRI Shapefile data provide an additional *.cpg-file
containing the character set name for string-fields in the *.dbf-file.
One such provider is HERE/NavStreets street map data.
Currently the API-user has to specify a Charset to the
ShapefileDataStoreFactory to ensure properly read string values. The
application has to ask the application-user to look up the Charset in
the *.cpg-file and copy or type the name. That's rather awkward.
I prepared a solution which adds 15 lines to ShapefileDataStoreFactory
plus a unit-test and test-data. If a file named <my_shapefile>.cpg is
present beside <my_shapefile>.dbf and the other files, and the Charset
can be determined from the file without error, a possibly present
factory parameter is ignored and overridden by the Charset found in the
file.
What do you think?
Regards
Burkhard
_______________________________________________
GeoTools-Devel mailing list
GeoTools-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel