Closed bokuno closed 9 years ago
what ld2 file did you use?
Maybe this one : 新日汉大辞典
But, this time I tried, and found that ERROR msg has changed to: qUncompress: Z_DATA_ERROR: Input data is corrupted
and I got an output file, but when I tried to open it, my shell just said that it maybe a binary file. Isn't it a text file ?
Below I put all I got from my shell:
File: newjcdict.ld2
Type: LD2
Version: 2.0
ID: 0x7F854A05
Summary Addr: 1A60
Summary Type: 3
Dictionary Type: 0x3
Index Numbers: 100932
Index Address/Size: 0x1A7C / 403728 B
Compressed Data Address/Size: 0x65B7C / 5074111 B
Phrases Index Address/Size(Decompressed): 0x0 / 3618880 B
Phrases Address/Size(Decompressed): 0x373840 / 5604902 B
XML Address/Size(Decompressed): 0x8CBE66 / 15813198 B
File Size(Decompressed): 24450 KB
Decompressing 1529 data streams.
qUncompress: Z_DATA_ERROR: Input data is corrupted
Phrases Encoding: UTF-8
XML Encoding: UTF-8
Extracted 361887 entries.
It's the poor encoding detection mechanism that causes this issue.
I'll invest more time to find a decent solution.
Thanks. Looking forward to it :)
Merry Christmas! Hopefully the lastest code can address your problem.
The automatic detection is still broken sometimes. It can not guess whether the decoded result is correct or not. But I let the application output more information and you can adjust the encoding if it's wrong.
Thank you for your working! Long time passed before I write this comment, sorry for that :)
Welcome. But you might encounter another issue as described in #5
I got this: qUncompress: could not allocate enough memory to uncompress data ERROR: Inflated Data is Empty. I'm on a 32-bit + 2GB ram machine with KDE desktop. I downloaded a .ld2 dict file from the lingoes website, and try to output it to a .txt file, but it outputted as above.