میهمان گرامی ،
من آن را تست در فروم من (در نه UTF) و من می تواند به آن تکثیر اما شما می توانید در این راه حل را امتحان کنید.
من چیزی برای شما :
1. باز کردن ، ایجاد یک کپی و ویرایش این فایل :
انجمن ریشه / شامل / vbenterprisetranslator_functions_utils.php
2. در این تابع :
PHP Code:
function vbet_encodeToSafeUTF8(&$string) {
//TODO how to check does utf-8 is involved? how often this function is used?
// if (! ereg('[\200-\237]', $string) and ! ereg('[\241-\377]', $string))
// if (!preg_match('/[\200-\237]/', $string) and !preg_match('/[\241-\377]/', $string))
// if (!preg_match('/[\200-\237\241-\377]/e', $string))
// return $string;
// decode three byte unicode characters
$string = preg_replace('/([\340-\357])([\200-\277])([\200-\277])/e',
'\'&#\'.((ord(\'\\1\')-224)*4096 + (ord(\'\\2\')-128)*64 + (ord(\'\\3\')-128)).\';\'',
$string);
//decode two byte unicode characters
$string = preg_replace('/([\300-\337])([\200-\277])/e',
'\'&#\'.((ord(\'\\1\')-192)*64+(ord(\'\\2\')-128)).\';\'',
$string);
return $string;
}
3. و اظهار نظر در تمام خطوط بدون برگشت مثل این یکی :
PHP Code:
function vbet_encodeToSafeUTF8(&$string) {
//TODO how to check does utf-8 is involved? how often this function is used?
// if (! ereg('[\200-\237]', $string) and ! ereg('[\241-\377]', $string))
// if (!preg_match('/[\200-\237]/', $string) and !preg_match('/[\241-\377]/', $string))
// if (!preg_match('/[\200-\237\241-\377]/e', $string))
// return $string;
// decode three byte unicode characters
// $string = preg_replace('/([\340-\357])([\200-\277])([\200-\277])/e',
// '\'&#\'.((ord(\'\\1\')-224)*4096 + (ord(\'\\2\')-128)*64 + (ord(\'\\3\')-128)).\';\'',
// $string);
//decode two byte unicode characters
//$string = preg_replace('/([\300-\337])([\200-\277])/e',
// '\'&#\'.((ord(\'\\1\')-192)*64+(ord(\'\\2\')-128)).\';\'',
// $string);
return $string;
}
4. ذخیره و تست!
این کار فقط باید برای پست های جدید است. همه پست موجود شما باید با دست را ویرایش کنید.
من shure نیست که شما یک ISO انجمن اما شما می توانید آن را را تست کنید. اگر خوب نیست -- لطفا بازنویسی این تغییرات فایل BU قدیمی