[imp] Spell check errors with apostrophe's

Dominic Ijichi dom@ijichi.org
Wed, 26 Jun 2002 16:37:04 +0100


Yep, you da man.

Cheers
dom

> I just installed aspell here... and found the same problem... the
> escapeShellCmd() command adds slashes on single quotes which messes things
> up. a
> patch for my fix is below.
> 
> This does not fix the other bug I just noticed, the echo command has a
> maximum
> length that it will accept on windows systems :-( so i can't spell check this
> email.
> 
> just looking at the code and there is some special case code in there for
> French
> spell checking, does this actually work? it looks like it might get messed up
> with the escapeShellCmd() call too... but i can't speak or type french so
> wouldn't really know :-)
> 
> 
> FYI: Windows users - aspell is easy to install.. just download the binary,
> extract it to somewhere and point IMP to it, that's it... and i've put it off
> for months thinking it could be hard :-)
> 
> - Mike :-)
> 
> 
> Index: imp/spelling.php
> ===================================================================
> RCS file: /httpd/horde/imp/spelling.php,v
> retrieving revision 2.40
> diff -I$Horde -I$Revision -I$Date -u -r2.40 spelling.php
> --- imp/spelling.php	2002/03/21 16:57:19	2.40
> +++ imp/spelling.php	2002/06/26 15:13:59
> @@ -178,6 +178,8 @@
>  } else {
>      $tocheck = '"' . str_replace("\n", "\n^", $tocheck) . '"';
>  }
> +$tocheck = str_replace("\\'", "'", $tocheck);
> +
>  exec("echo $tocheck | " . $conf['utils']['spellchecker'] . ' -a ' .
> $spell_opt,
> $warnings);
>  
>  $msg = '';
> 
> 
> Quoting Dominic Ijichi <dom@ijichi.org>:
> 
> > Hi,
> > 
> > I'm getting a problem when trying to spell check words with apostrophes
> > (I've,
> > wouldn't, shouldn't, didn't etc etc).  Works perfectly apart from that.
> > 
> > Magic quotes turned off.  Get this on RELENG and HEAD.  Aspell 33.7.1p2,
> > Pspell
> > 12.2, PHP 4.2.1.
> > 
> > eg, when I try and check this message, I get lines such as:
> > 
> > '"ve" in erminator and everything goes ho'
> > 'Correct  "wouldn" in wouldn I'm getting a problem when tr'
> > 
> > Any ideas?
> > 
> > dom
> > 
> > ------------------------------------------
> > This message was penned by the hand of Dom
> > 
> > -- 
> > IMP mailing list
> > Frequently Asked Questions: http://horde.org/faq/
> > To unsubscribe, mail: imp-unsubscribe@lists.horde.org
> 
> -------------------------------------------------------------------------
> This mail sent from Mike's CVS HEAD install of IMP: http://horde.org/imp/
> 
> 
> 
> -- 
> IMP mailing list
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: imp-unsubscribe@lists.horde.org


------------------------------------------
This message was penned by the hand of Dom