hello
I come from China, English is not good I hope you can understand what I mean.
when i set gb2312 as the encodingtype, it is broken.
this bug look like bug 3442164.
DBF.java
protected void write_Field_header(Field tField) throws IOException, xBaseJException {
byte[] byter = new byte[15];
int nameLength = tField.getName().length();
int i = 0;
byte[] b;
try { b = tField.getName().toUpperCase().getBytes(encodedType);
} catch (UnsupportedEncodingException UEE) {
b = tField.getName().toUpperCase().getBytes();
}
for (int x = 0; x < b.length; x++) {
byter[x] = b[x];
}
this.file.write(byter, 0, nameLength);
for (i = 0; i < 14; i++) {
byter[i] = 0;
}
this.file.writeByte(0);
if (nameLength < 10) {
this.file.write(byter, 0, 10 - nameLength);
}
this.file.writeByte(tField.getType());
this.file.write(byter, 0, 4);
this.file.writeByte(tField.getLength());
this.file.writeByte(tField.getDecimalPositionCount());
if ((this.version == 3) || (this.version == -125)) {
byter[2] = 1;
}
this.file.write(byter, 0, 14);
}
do you have a fix for this bug?