1

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");
outFile.createNewFile();
FileDataStore ds = FileDataStoreFinder.getDataStore(outFile);  
ds.createSchema(outSchema);   
SimpleFeatureSource featureSource = ds.getFeatureSource();

Where can I set the charset?

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, privacy policy and cookie policy

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