mirror of
https://bitbucket.org/jsuto/piler.git
synced 2026-10-01 12:50:20 +02:00
fixed a bug in the character conversion to utf-8 function
This commit is contained in:
1 parent
8bf9fb318b
commit
7c7b30b544
3 files changed
+46
-8
No files matched your search
@@ -346,6 +346,8 @@ class ModelSearchMessage extends Model {
|
||||
$what = preg_replace("/^\=\?/", "", $what);
|
||||
$what = preg_replace("/\?\=$/", "", $what);
|
||||
|
||||
$encoding = substr($what, 0, strpos($what, '?'));
|
||||
|
||||
if(preg_match("/\?Q\?/i", $what)){
|
||||
$x = preg_replace("/^([\w\-]+)\?Q\?/i", "", $what);
|
||||
|
||||
@@ -360,9 +362,8 @@ class ModelSearchMessage extends Model {
|
||||
$s = preg_replace('/\0/', "*", $s);
|
||||
}
|
||||
|
||||
|
||||
if(!preg_match("/utf-8/i", $what)){
|
||||
$s = utf8_encode($s);
|
||||
if(!preg_match("/utf-8/i", $encoding)){
|
||||
$s = iconv($encoding, 'utf-8', $s);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user