|
@@ 2947-2952 (lines=6) @@
|
| 2944 |
|
// check for BOM |
| 2945 |
|
if (($len > 2) && ((($lstring[0] == "\xFE") && ($lstring[1] == "\xFF")) || (($lstring[0] == "\xFF") && ($lstring[1] == "\xFE")))) { |
| 2946 |
|
// UTF-16 |
| 2947 |
|
if (preg_match('/(.*)\x00/', $lstring, $lmatches)) { |
| 2948 |
|
$count = strlen($lmatches[1]) * 2 + 2; //account for 2 byte characters and trailing \x0000 |
| 2949 |
|
return getid3_lib::iconv_fallback_utf16_utf8($lmatches[1]); |
| 2950 |
|
} else { |
| 2951 |
|
return ''; |
| 2952 |
|
} |
| 2953 |
|
} |
| 2954 |
|
// UTF-8 |
| 2955 |
|
if (preg_match('/(.*)\x00/', $lstring, $lmatches)) { |
|
@@ 2955-2958 (lines=4) @@
|
| 2952 |
|
} |
| 2953 |
|
} |
| 2954 |
|
// UTF-8 |
| 2955 |
|
if (preg_match('/(.*)\x00/', $lstring, $lmatches)) { |
| 2956 |
|
$count = strlen($lmatches[1]) + 1; //account for trailing \x00 |
| 2957 |
|
return $lmatches[1]; |
| 2958 |
|
} |
| 2959 |
|
return ''; |
| 2960 |
|
} |
| 2961 |
|
|