| | |
| | | function get_xml() |
| | | { |
| | | // send output |
| | | $out = '<?xml version="1.0" encoding="'.RCMAIL_CHARSET.'"?><spellresult charschecked="'.mb_strlen($this->content).'">'; |
| | | $out = '<?xml version="1.0" encoding="'.RCUBE_CHARSET.'"?><spellresult charschecked="'.mb_strlen($this->content).'">'; |
| | | |
| | | foreach ($this->matches as $item) { |
| | | $out .= '<c o="'.$item[1].'" l="'.$item[2].'">'; |
| | |
| | | $word = $item[0]; |
| | | } |
| | | else { |
| | | $word = mb_substr($this->content, $item[1], $item[2], RCMAIL_CHARSET); |
| | | $word = mb_substr($this->content, $item[1], $item[2], RCUBE_CHARSET); |
| | | } |
| | | $result[$word] = is_array($item[4]) ? implode("\t", $item[4]) : $item[4]; |
| | | } |
| | |
| | | return; |
| | | } |
| | | |
| | | $this->plink = pspell_new($this->lang, null, null, RCMAIL_CHARSET, PSPELL_FAST); |
| | | $this->plink = pspell_new($this->lang, null, null, RCUBE_CHARSET, PSPELL_FAST); |
| | | } |
| | | |
| | | if (!$this->plink) { |
| | |
| | | || !empty($this->options['ignore_caps']) || !empty($this->options['dictionary']) |
| | | ) { |
| | | foreach ($matches as $idx => $m) { |
| | | $word = mb_substr($text, $m[1], $m[2], RCMAIL_CHARSET); |
| | | $word = mb_substr($text, $m[1], $m[2], RCUBE_CHARSET); |
| | | // skip exceptions |
| | | if ($this->is_exception($word)) { |
| | | unset($matches[$idx]); |
| | |
| | | $result = array(); |
| | | |
| | | foreach ($matches as $m) { |
| | | $result[] = mb_substr($text, $m[1], $m[2], RCMAIL_CHARSET); |
| | | $result[] = mb_substr($text, $m[1], $m[2], RCUBE_CHARSET); |
| | | } |
| | | |
| | | return $result; |