I have a well-made geojson file. Of course it is well made with shapefiles. I want to set the charset when creating the shapefile.

Below is part of the code.

File outFile = new File("D:\\geojson.shp");
FileDataStore ds = FileDataStoreFinder.getDataStore(outFile);  
SimpleFeatureSource featureSource = ds.getFeatureSource();

Where can I set the charset?

1 Answer 1


ShapeFileDataStore has a method setCharset(Charset) that might just do what you want.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.