iryndin / jdbf

Java utility to read/write DBF files
108 stars 77 forks source link

MetaData Can not recognize Chinese #17

Open jiangzif opened 9 years ago

jiangzif commented 9 years ago

When the ‘DBF’ file have Chinese headers,Can not recognize

jiangzif commented 9 years ago

I think I have solved this problem: Change “class DbfMetadataUtils”

public static DbfField createDbfField(byte[] fieldBytes) {
        DbfField field = new DbfField();
        // 1. Set name
        {
            int i = 0;
            for (i = 0; i < 11 && fieldBytes[i] != 0; i++) ;
            field.setName(new String(fieldBytes, 0, i));
        }
......
iryndin commented 8 years ago

Hi @jiangzif ! Sorry for answering you so late! Could you please provide this workaround as pull request and provide also unit test for that? And could you please provide DBF files with Chinis headers?

jiangzif commented 8 years ago

dont upload dbf file!

iryndin commented 8 years ago

Hi @jiangzif, please put this DBF file on any cloud storage (like Dropbox or Google Drive) and write here a comment with link to this file. If you don't want to share this file in public, you can send me a link via email: iryndin DOG gmail DOT com. Thank you!

jiangzif commented 8 years ago

Hi @iryndin, Googgle Drive share: https://drive.google.com/file/d/0B_iFsy40WRVvSS02ZmhSOXhHQ2M/view?usp=sharing I've sent you an email。

tballison commented 8 years ago

@jiangzif , would you mind if we added your file as a test case to Apache Tika for TIKA-1513?