안녕하세요,
나는 (내 테스트 포럼에 테스트를 오전 아니 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 포럼하지만 그것을 테스트할 수 있습니다. 그렇지 않다면 좋은 것은 - 덮어 이러한 변화 부 오래된 파일을하시기 바랍니다