Problem with apostrophes and other special characters when using aspell in windows

Posted by Loftx on Stack Overflow See other posts from Stack Overflow or by Loftx
Published on 2010-04-01T11:19:37Z Indexed on 2010/04/01 11:23 UTC
Read the original article Hit count: 431

Filed under:
|
|
|

Hi there,

We seem to be having a problem with the spell checker on our content management system where it marks the ve part of We’ve as a misspelling. The spellchecker uses aspell which is called from a script on the server which executes the cmd.exe and uses it to pipe a file into aspell (it's a long winded way I know, but our server side programming langauge (ColdFusion) doesn't support writing to stdin for executables).

Aspell is called by executing:

c:\windows\system32\cmd.exe /c type d:\path_to_file\file.txt | "C:\Program Files\Aspell\bin\aspell" --lang=en -a

Where file.txt contains the text to be spelled e.g. ^Oh have We’ve (the carat is added to prevent piping problems I believe).

Aspell then output:

@(#) International Ispell Version 3.1.20 (but really Aspell 0.50.3)
*
*
*
& ve 62 12: vie, voe, V, v, veg, vet, Be, Ce, be, Ev, E, e, vex, VA, VI, Va, Vi, vi, we, VD, VF, VG, VJ, VP, VT, Vt, vb, vs, DE, De, Fe, GE, Ge, He, IE, Le, ME, Me, NE, Ne, OE, PE, Re, SE, Se, Te, Xe, he, me, re, ye, Ave, Eve, Ive, ave, eve, VAR, var, veer, vier, view, vow

However, we have a dev site, with the same version of Aspell, and when the same file is used it outputs with no misspellings. Both servers are running Aspell 0.50.3 on Windows server 2003, but there could be other differences in configuration:

@(#) International Ispell Version 3.1.20 (but really Aspell 0.50.3)

I'm wondering if the problem is to do with the piping part of the process or something different in the Aspell configuration. Does anyone have any ideas?

Cheers,

Tom

© Stack Overflow or respective owner

Related posts about aspell

Related posts about Windows