summaryrefslogtreecommitdiff
path: root/roundcubemail/program/steps/mail/spell_pspell.inc
diff options
context:
space:
mode:
authoralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2009-07-23 12:12:27 +0000
committeralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2009-07-23 12:12:27 +0000
commitd3ce61a4e04ace77827e1cdc7f6c5860029fb6e1 (patch)
tree6586c42e1dc4627666be49faf337fdb0f4dea144 /roundcubemail/program/steps/mail/spell_pspell.inc
parent3934f815932fa6dcfe7bf15c3d49bbb0036cec3e (diff)
- performance fix: don't check mbstring functions existence too often
git-svn-id: https://svn.roundcube.net/trunk@2788 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/steps/mail/spell_pspell.inc')
-rw-r--r--roundcubemail/program/steps/mail/spell_pspell.inc4
1 files changed, 2 insertions, 2 deletions
diff --git a/roundcubemail/program/steps/mail/spell_pspell.inc b/roundcubemail/program/steps/mail/spell_pspell.inc
index 8e574a62d..717b92ee5 100644
--- a/roundcubemail/program/steps/mail/spell_pspell.inc
+++ b/roundcubemail/program/steps/mail/spell_pspell.inc
@@ -49,13 +49,13 @@ $words = preg_split('/[ !"#$%&()*+\\,-.\/\n:;<=>?@\[\]^_{|}]+/', $text, NULL, P
$plink = pspell_new(get_input_value('lang', RCUBE_INPUT_GET), null, null, RCMAIL_CHARSET, PSPELL_FAST);
// send output
-$out = '<?xml version="1.0" encoding="'.RCMAIL_CHARSET.'"?><spellresult charschecked="'.rc_strlen($text).'">';
+$out = '<?xml version="1.0" encoding="'.RCMAIL_CHARSET.'"?><spellresult charschecked="'.mb_strlen($text).'">';
$diff = 0;
foreach ($words as $w) {
$word = trim($w[0]);
$pos = $w[1] - $diff;
- $len = rc_strlen($word);
+ $len = mb_strlen($word);
if ($word && $plink && !pspell_check($plink, $word)) {
$suggestions = pspell_suggest($plink, $word);
if (sizeof($suggestions)>10)