DBFFile icon indicating copy to clipboard operation
DBFFile copied to clipboard

fix:memo decoding

Open banned-historical-archives opened this issue 2 years ago • 3 comments

Thanks for the contribution @banned-historical-archives!

Can you post here some info about the bug that this PR is fixing? Which dbf versions does this apply to? Would this change break decoding for any other versions? Is there a sample dbf that highlights the need for this fix so we can add unit tests?

yortus avatar Aug 11 '22 07:08 yortus

@yortus

The problem is that binary data didn't merge before decoding, some Chinese characters will not be correctly decoded if it cross blocks.

And sorry, I didn't add it to unit test due to the large file size.

I'm not sure which version it is (seems like v3?)

https://github.com/banned-historical-archives/banned-historical-archives.github.io/tree/master/public/TheGPCRdatabase/mainfile.dbf https://github.com/banned-historical-archives/banned-historical-archives.github.io/blob/master/public/TheGPCRdatabase/mainfile.FPT

@banned-historical-archives thanks for the additional info, it makes perfects sense. Would it be ok to add the above dbf file to the test suite? It would be great to have a new unit test that passes with the changes in this PR but fails with the previous code.

yortus avatar Aug 13 '22 10:08 yortus

Hi @banned-historical-archives, just asking again if the files you've linked can be used as test fixtures? I'm happy to take this PR to fix the decoding issue as long as we have some unit tests covering it.

yortus avatar Oct 07 '22 06:10 yortus

@yortus Done

Thanks @banned-historical-archives! Your fixes have been merged and published in v1.9.1.

yortus avatar Oct 16 '22 08:10 yortus