Revision 28911 trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/drivers/dbf/DbaseFile.java
DbaseFile.java | ||
---|---|---|
16 | 16 |
import java.nio.ByteBuffer; |
17 | 17 |
import java.nio.channels.FileChannel; |
18 | 18 |
import java.nio.charset.Charset; |
19 |
import java.nio.charset.UnsupportedCharsetException; |
|
19 | 20 |
import java.text.FieldPosition; |
20 | 21 |
import java.text.NumberFormat; |
21 | 22 |
import java.util.Calendar; |
22 | 23 |
import java.util.Date; |
23 | 24 |
import java.util.Locale; |
24 | 25 |
|
26 |
import javax.swing.JOptionPane; |
|
27 |
|
|
28 |
import org.apache.log4j.Logger; |
|
29 |
|
|
25 | 30 |
import com.hardcode.gdbms.driver.exceptions.FileNotFoundDriverException; |
26 | 31 |
import com.iver.utiles.bigfile.BigByteBuffer2; |
27 | 32 |
|
... | ... | |
404 | 409 |
System.out.println("Opening file " + file.getName() + " with encoding " + charSetName); |
405 | 410 |
if (charSetName.equalsIgnoreCase("UNKNOWN")) |
406 | 411 |
charSet = Charset.defaultCharset(); |
407 |
else |
|
408 |
charSet = Charset.forName(charSetName); |
|
412 |
else{ |
|
413 |
try{ |
|
414 |
charSet = Charset.forName(charSetName); |
|
415 |
}catch (UnsupportedCharsetException e) { |
|
416 |
charSet = Charset.defaultCharset(); |
|
417 |
} |
|
418 |
} |
|
409 | 419 |
} |
410 | 420 |
bytesCachedRecord = new byte[myHeader.getRecordLength()]; |
411 | 421 |
}catch (IOException e) { |
Also available in: Unified diff