Summary: | kspell2 doesn't like ipsell hash files | ||
---|---|---|---|
Product: | [Unmaintained] kdelibs | Reporter: | Harri Porten <porten> |
Component: | kspell | Assignee: | Zack Rusin <zack> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | guru |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Harri Porten
2004-05-12 11:51:33 UTC
I have the same behavior. FYI I'm using : ispell -v @(#) International Ispell Version 3.2.06 08/01/01 aspell -v @(#) International Ispell Version 3.1.20 (but really Aspell 0.50.3) Could it be that the headers of the .hash files do not have the same structure for various versions of ISpell? Looking at the ispell.h for 3.1.20 and for 3.2.06, I noticed that there could be subtle changes in the headers. The KSpell2 code assumes a certain structure of the header (by including a particular ispell.h in the source code). best, Jeroen Same here I've the same problem with KDE 3.4.2 / KWord 1.4.1 on FreeBSD 6.0-REL: $ ispell -v @(#) International Ispell Version 3.2.06 08/01/01 $ ispell -w'$' -d/usr/local/share/ispell/espanol.hash -T.txt test works fine while KWord gives: $ kword test Illegal format hash table /usr/local/share/ispell/espanol.hash - expected magic2 0x9602, got 0x0 kword: ERROR: Language "es" doesn't exist for Ispell $ I've watched it with strace and it tries to read the file but don't understand it: ... open("/usr/local/share/ispell/espanol.hash", O_RDONLY) = 11 fstat(11, {st_mode=0177777, st_size=9223372034707292159, ...}) = 0 read(11, "\2\226\7\0\0\2\n\0\3\0\377\377\224^\10\0\'\23\1\0\275\276"..., 4096) = 4096 read(11, "\335\1\336\1\337\1\340\1\341\1\342\1\343\1\344\1\345\1"..., 4096) = 4096 write(2, "\355\1\356\1\357\1\360\1\361\1\362\1\363\1\364\1\365\1"..., 98) = 98 ... Ditto. I'm using KDE 3.5.1 and KWord 1.4.2, AMD64 (kde and kword are compiled as 64 bit) and Gentoo. My xsession error is a little bit different though: Illegal format hash table /usr/lib/ispell/american.hash - expected magic2 0x9602, got 0x0 Illegal format hash table /usr/lib/ispell/british.hash - expected magic2 0x9602, got 0x0 The "got" part is 0, instead of what Harri posted. Ispell and Aspell are both installed, Aspell en_US dictionary is installed, and both tools work from the command line. yeah, it expects the ispell dictionaries done for enchant. So what does that mean? uninstall ispell and reinstall enchant? I already have enchant, but I think I have installed ispell more recently. Do they conflict? Scott I just installed kword, koffice-libs and koffice-data v1.5.0 and I still get this behavior. I fix this bug. We need MAXSTRINGCHARS=512, like in ispell config.X Please, add this fix in KDE-3.5.3 diff -ur kdelibs-3.5.2-orig/kspell2/plugins/ispell/ispell.h kdelibs-3.5.2-ispell_fixed/kspell2/plugins/ispell/ispel l.h --- kdelibs-3.5.2-orig/kspell2/plugins/ispell/ispell.h 2005-10-10 18:05:54.000000000 +0300 +++ kdelibs-3.5.2-ispell_fixed/kspell2/plugins/ispell/ispell.h 2006-04-24 12:13:08.000000000 +0300 @@ -329,7 +329,7 @@ ** character counts as two! */ #ifndef MAXSTRINGCHARS -#define MAXSTRINGCHARS 128 +#define MAXSTRINGCHARS 512 #endif /* MAXSTRINGCHARS */ /* This bug is more complex then Mihail's patch suggests. Ispell uses a very brittle binary file format. It varies widely, in usage, there are enianness conficts, string size conflicts and other problems. Commiting Mihail's patch only breaks only dictionaries. Until a better heuristic to determine the nature of the ispell data is available KDE will not regress in the data that is does support. Dom Lachowicz (of Abiword fame) might do the work with his Enchant plugin for Ispell and we could then backport it. However, I highly suggest using Aspell of Myspell/Hunspell. We removed our custom Ispell plugin, Ispell dictionaries go only through Enchant now. |