WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

getid3_lib::MultiByteCharString2HTML() public WP 1.0

Это метод класса: getid3_lib{}

Хуков нет.

Возвращает

Строку.

Использование

$result = getid3_lib::MultiByteCharString2HTML( $string, $charset );
$string(строка/число/float) (обязательный)
$charset(строка)

По умолчанию: 'ISO-8859-1'

Код getid3_lib::MultiByteCharString2HTML() WP 5.5.1

wp-includes/ID3/getid3.lib.php
<?php
public static function MultiByteCharString2HTML($string, $charset='ISO-8859-1') {
	$string = (string) $string; // in case trying to pass a numeric (float, int) string, would otherwise return an empty string
	$HTMLstring = '';

	switch (strtolower($charset)) {
		case '1251':
		case '1252':
		case '866':
		case '932':
		case '936':
		case '950':
		case 'big5':
		case 'big5-hkscs':
		case 'cp1251':
		case 'cp1252':
		case 'cp866':
		case 'euc-jp':
		case 'eucjp':
		case 'gb2312':
		case 'ibm866':
		case 'iso-8859-1':
		case 'iso-8859-15':
		case 'iso8859-1':
		case 'iso8859-15':
		case 'koi8-r':
		case 'koi8-ru':
		case 'koi8r':
		case 'shift_jis':
		case 'sjis':
		case 'win-1251':
		case 'windows-1251':
		case 'windows-1252':
			$HTMLstring = htmlentities($string, ENT_COMPAT, $charset);
			break;

		case 'utf-8':
			$strlen = strlen($string);
			for ($i = 0; $i < $strlen; $i++) {
				$char_ord_val = ord($string[$i]);
				$charval = 0;
				if ($char_ord_val < 0x80) {
					$charval = $char_ord_val;
				} elseif ((($char_ord_val & 0xF0) >> 4) == 0x0F  &&  $i+3 < $strlen) {
					$charval  = (($char_ord_val & 0x07) << 18);
					$charval += ((ord($string[++$i]) & 0x3F) << 12);
					$charval += ((ord($string[++$i]) & 0x3F) << 6);
					$charval +=  (ord($string[++$i]) & 0x3F);
				} elseif ((($char_ord_val & 0xE0) >> 5) == 0x07  &&  $i+2 < $strlen) {
					$charval  = (($char_ord_val & 0x0F) << 12);
					$charval += ((ord($string[++$i]) & 0x3F) << 6);
					$charval +=  (ord($string[++$i]) & 0x3F);
				} elseif ((($char_ord_val & 0xC0) >> 6) == 0x03  &&  $i+1 < $strlen) {
					$charval  = (($char_ord_val & 0x1F) << 6);
					$charval += (ord($string[++$i]) & 0x3F);
				}
				if (($charval >= 32) && ($charval <= 127)) {
					$HTMLstring .= htmlentities(chr($charval));
				} else {
					$HTMLstring .= '&#'.$charval.';';
				}
			}
			break;

		case 'utf-16le':
			for ($i = 0; $i < strlen($string); $i += 2) {
				$charval = self::LittleEndian2Int(substr($string, $i, 2));
				if (($charval >= 32) && ($charval <= 127)) {
					$HTMLstring .= chr($charval);
				} else {
					$HTMLstring .= '&#'.$charval.';';
				}
			}
			break;

		case 'utf-16be':
			for ($i = 0; $i < strlen($string); $i += 2) {
				$charval = self::BigEndian2Int(substr($string, $i, 2));
				if (($charval >= 32) && ($charval <= 127)) {
					$HTMLstring .= chr($charval);
				} else {
					$HTMLstring .= '&#'.$charval.';';
				}
			}
			break;

		default:
			$HTMLstring = 'ERROR: Character set "'.$charset.'" not supported in MultiByteCharString2HTML()';
			break;
	}
	return $HTMLstring;
}