ScapeToad icon indicating copy to clipboard operation
ScapeToad copied to clipboard

When runs in NOT UTF-8 Encoding environment, you must setting jvm parameters with -Dfile.encoding=utf8 !

Open rufushuang opened this issue 10 years ago • 0 comments

When you find NO response to opening a .shp file, this is caused an exception in

java.lang.StringIndexOutOfBoundsException: String index out of range: 402 at java.lang.AbstractStringBuilder.substring(Unknown Source) at java.lang.StringBuffer.substring(Unknown Source) at org.geotools.dbffile.DbfFile.ParseRecordColumn(DbfFile.java:262) at com.vividsolutions.jump.io.ShapefileReader.read(ShapefileReader.java: 175) at ch.epfl.scapetoad.IOManager.readShapefile(IOManager.java:141) at ch.epfl.scapetoad.IOManager.openShapefile(IOManager.java:109) at ch.epfl.scapetoad.ActionLayerAdd.actionPerformed(ActionLayerAdd.java: 47)

The reason is you system is NOT a UTF-8 Encoding default environment. And this can be fixed by set -Dfile.encoding=utf8 jvm parameter.

But, it's no use to add parameter to packaged 'ScapeToad.exe'. Instead, you can find the unpacked tempX.jar in your temp file, and run it like

java -Dfile.encoding=utf8 -Xmx512m -jar temp4.jar

Maybe the project owner should change the JSmooth packing settings and add the -Dfile.encoding=utf8 as default.

rufushuang avatar Sep 28 '14 11:09 rufushuang