| 100 |
|
|
| 101 |
if ($filter) { |
if ($filter) { |
| 102 |
// Limit the Output to 80000 characters |
// Limit the Output to 80000 characters |
| 103 |
return utf8_encode(substr(shell_exec($filter . ' ' . $arg . ' '),0,80000)); |
$output = substr(shell_exec($filter . ' ' . $arg . ' '),0,80000); |
| 104 |
|
// and check if search result is already in UTF-8 (is there a better way) |
| 105 |
|
if (strpos($output,"i?1/2",0) !== false ) { // "i?1/2" is ALT+159 --> is already in utf8 |
| 106 |
|
return $output; |
| 107 |
|
} else { |
| 108 |
|
return utf8_encode($output); |
| 109 |
|
} |
| 110 |
} |
} |
| 111 |
} |
} |
| 112 |
|
|