Revision 8181 trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/edition/writers/shp/ShpWriter.java
ShpWriter.java | ||
---|---|---|
6 | 6 |
import java.io.RandomAccessFile; |
7 | 7 |
import java.nio.channels.FileChannel; |
8 | 8 |
import java.nio.channels.WritableByteChannel; |
9 |
import java.nio.charset.Charset; |
|
9 | 10 |
import java.sql.Types; |
10 | 11 |
|
11 | 12 |
import com.iver.cit.gvsig.fmap.DriverException; |
... | ... | |
57 | 58 |
FShape.POLYGON, |
58 | 59 |
FShape.TEXT |
59 | 60 |
}; |
61 |
private Charset charset = Charset.forName("ISO-8859-1"); |
|
60 | 62 |
|
61 | 63 |
public void setFile(File f) |
62 | 64 |
{ |
... | ... | |
220 | 222 |
myHeader.setNumRecords(0); |
221 | 223 |
dbfWrite = new DbaseFileWriterNIO(myHeader, |
222 | 224 |
(FileChannel) getWriteChannel(dbfPath)); |
225 |
|
|
226 |
dbfWrite.setCharset(charset); |
|
223 | 227 |
|
224 | 228 |
record = new Object[myHeader.getNumFields()]; |
225 | 229 |
numRows = 0; |
... | ... | |
393 | 397 |
} |
394 | 398 |
return false; |
395 | 399 |
} |
400 |
|
|
401 |
public void setCharsetForWriting(Charset charset) { |
|
402 |
this.charset = charset; |
|
403 |
} |
|
396 | 404 |
|
405 |
public Charset getCharsetForWriting() { |
|
406 |
return charset; |
|
407 |
} |
|
408 |
|
|
397 | 409 |
} |
Also available in: Unified diff