Skip to content

Commit 5d8430c

Browse files
author
goran
committed
Changed PSpellShell to work with UTF-8 encoded text in my environment
1 parent d237b5f commit 5d8430c

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

classes/PSpellShell.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ function &checkWords($lang, $words) {
4444
preg_match("/\& ([^ ]+) .*/i", $dstr, $matches);
4545

4646
if (!empty($matches[1]))
47-
$returnData[] = utf8_encode(trim($matches[1]));
47+
$returnData[] = trim($matches[1]);
4848
}
4949

5050
return $returnData;
@@ -60,11 +60,6 @@ function &checkWords($lang, $words) {
6060
function &getSuggestions($lang, $word) {
6161
$cmd = $this->_getCMD($lang);
6262

63-
if (function_exists("mb_convert_encoding"))
64-
$word = mb_convert_encoding($word, "ISO-8859-1", mb_detect_encoding($word, "UTF-8"));
65-
else
66-
$word = utf8_encode($word);
67-
6863
if ($fh = fopen($this->_tmpfile, "w")) {
6964
fwrite($fh, "!\n");
7065
fwrite($fh, "^$word\n");

0 commit comments

Comments
 (0)