-
Notifications
You must be signed in to change notification settings - Fork 134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
improve handling of charset during import and export of shapefiles #216
Conversation
process Signed-off-by: Nikolaos Pringouris <nprigour@gmail.com>
Thanks for this improvement, going to test it these days Triggered a build : https://hudson.locationtech.org/udig/job/uDig-PR-NG/37/ (login with your Eclipse Account) @nprigour Could you have a look at the docs, if and how this Operation can co-exists |
and P_DEFAULT_CHARSET preference value Signed-off-by: Nikolaos Pringouris <nprigour@gmail.com>
Hi Frank, Set of desired charset during export operation is not affected by the issue you mention and the amendment (the initial enhancement provides the ability to export using a specific charset and does not touch the source shapefile) |
I tested a bit .. and have some questions:
|
It would be great if we have a sample-/test-dataset to test charset handling .. |
Please find the answers below:
To summarize we define the shp.encoding variable since we wanted to ensure that multiple users (in their local installations) always used a specific encoding while importing shp in udig (and that is the main reason for setting this variable). We could not rely in the ui Option since most of the times users forgot to change it and we resulted in erroneous shp data encoding. In any case this shp.encoding affects encoding only if it is specified as a java startup option. So I think it is just another feature to impose a certain encoding during import and a suggested encoding during export. If not specified then existing behavior remains unaffected. I am attaching 2 example shp files using iso-8859-7 & UTF-8 encoding (check the address field) |
Very interesting! The pull provides an option to set encoding for the Shapefile-Writer. I expect that the e.g. Strings-Attributes were created with this encoding. Whenever this exported ressources are imported again the shp.encoding says how to encode, if not set the default ISO8859-1 is used to read elements from dbf files. The user has the chance to change it with the Operation on the Catalog-entry in Catalog view, let's say UTF-8. Two things and it is ready for merge:
|
Signed-off-by: Nikolaos Pringouris <nprigour@gmail.com>
I have updated the documentation. |
Agree, column width we can address independently from this pull request. I really appreciate the documented |
Allows setting a default charset to via a system variable which will be used during shapefile import to udig.

Provides the ability to set the desired charset during export of shapefiles in udig (see attached screenshot)
Signed-off-by: Nikolaos Pringouris nprigour@gmail.com