forked from tinymce/tinymce_spellchecker_php
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Changed PSpellShell to work with UTF-8 encoded text in my environment
- Loading branch information
goran
committed
Mar 30, 2010
1 parent
d237b5f
commit 5d8430c
Showing
1 changed file
with
1 addition
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,7 +44,7 @@ function &checkWords($lang, $words) { | |
preg_match("/\& ([^ ]+) .*/i", $dstr, $matches); | ||
|
||
if (!empty($matches[1])) | ||
$returnData[] = utf8_encode(trim($matches[1])); | ||
This comment has been minimized.
Sorry, something went wrong. |
||
$returnData[] = trim($matches[1]); | ||
} | ||
|
||
return $returnData; | ||
|
@@ -60,11 +60,6 @@ function &checkWords($lang, $words) { | |
function &getSuggestions($lang, $word) { | ||
$cmd = $this->_getCMD($lang); | ||
|
||
if (function_exists("mb_convert_encoding")) | ||
$word = mb_convert_encoding($word, "ISO-8859-1", mb_detect_encoding($word, "UTF-8")); | ||
This comment has been minimized.
Sorry, something went wrong.
gjuric
Owner
|
||
else | ||
$word = utf8_encode($word); | ||
This comment has been minimized.
Sorry, something went wrong.
gjuric
Owner
|
||
|
||
if ($fh = fopen($this->_tmpfile, "w")) { | ||
fwrite($fh, "!\n"); | ||
fwrite($fh, "^$word\n"); | ||
|
We do not need to utf8_encode an UTF-8 string.