|
@@ 2819-2824 (lines=6) @@
|
| 2816 |
|
// check for BOM |
| 2817 |
|
if (($len > 2) && ((($lstring[0] == "\xFE") && ($lstring[1] == "\xFF")) || (($lstring[0] == "\xFF") && ($lstring[1] == "\xFE")))) { |
| 2818 |
|
// UTF-16 |
| 2819 |
|
if (preg_match('/(.*)\x00/', $lstring, $lmatches)) { |
| 2820 |
|
$count = strlen($lmatches[1]) * 2 + 2; //account for 2 byte characters and trailing \x0000 |
| 2821 |
|
return getid3_lib::iconv_fallback_utf16_utf8($lmatches[1]); |
| 2822 |
|
} else { |
| 2823 |
|
return ''; |
| 2824 |
|
} |
| 2825 |
|
} |
| 2826 |
|
// UTF-8 |
| 2827 |
|
if (preg_match('/(.*)\x00/', $lstring, $lmatches)) { |
|
@@ 2827-2830 (lines=4) @@
|
| 2824 |
|
} |
| 2825 |
|
} |
| 2826 |
|
// UTF-8 |
| 2827 |
|
if (preg_match('/(.*)\x00/', $lstring, $lmatches)) { |
| 2828 |
|
$count = strlen($lmatches[1]) + 1; //account for trailing \x00 |
| 2829 |
|
return $lmatches[1]; |
| 2830 |
|
} |
| 2831 |
|
return ''; |
| 2832 |
|
} |
| 2833 |
|
|