0

I am trying to get PSPELL 0.5.3 to work (i use Apache 2.2.12). I used the latest win32 installer and installed the latest german and english dictionaries from the GNU page.

Now when executing this test snippet

3    function testSpell($pspell_link) {
4       echo pspell_check($pspell_link, “testt”) ? 'OK' : 'NOT OK';
5    }
6    
7    $pspell_link = pspell_new('de');
8    testSpell($pspell_link);

to see if PSPELL is working correctly i get:

Warning: pspell_new() [function.pspell-new]: PSPELL couldn't open the dictionary. reason: The file "C:\Programme\Aspell\dict/de-only.rws" is not in the proper format. in ...\check.php on line 7

What can be done to get it into the right format so that i can use PSPELL?

BMDan
  • 7,249
  • 2
  • 23
  • 34
Thariama
  • 106
  • 1
  • 9

1 Answers1

1

From here, accuracy not guaranteed in the least:

Another common problem with ASpell on win32 is the error message:

<filename> is not in the proper format.

This can be resolved by converting all the files in the "Program Files\ASpelldata" directory from DOS to unix format. Search google for dos2unix.exe and you will find a utility that can do it. This will resolve the error.

Alternately, you can do it with a bit of PHP; just preg_replace between "\n" and "\r\n" (depending on which direction you're converting) across the whole file.

BMDan
  • 7,249
  • 2
  • 23
  • 34