geotools获取shapefile 属性名乱码问题

使用geotools修改shapefile之后, 发现dbf文件内容中, 属性名都成了乱码, 但属性值就不是乱码。修改之前还没有乱码的。
而且在代码中也已经通过以下方式设置过编码方式了:

ShapefileDataStore shape = new ShapefileDataStore(url);
shape.setStringCharset(Charset.forName("GBK"));

 参考:http://www.cnblogs.com/lingxue3769/archive/2011/11/17/2252659.html

 

转载自:https://blog.csdn.net/weixin_34402408/article/details/85505967

You may also like...

退出移动版