Code Duplication    Length = 8-8 lines in 2 locations

3rdparty/getID3/getid3/getid3.lib.php 2 locations

@@ 1284-1291 (lines=8) @@
1281
1282
		// mb_convert_encoding() available
1283
		if (function_exists('mb_convert_encoding')) {
1284
			if ($converted_string = @mb_convert_encoding($string, $out_charset, $in_charset)) {
1285
				switch ($out_charset) {
1286
					case 'ISO-8859-1':
1287
						$converted_string = rtrim($converted_string, "\x00");
1288
						break;
1289
				}
1290
				return $converted_string;
1291
			}
1292
			return $string;
1293
		}
1294
		// iconv() available
@@ 1296-1303 (lines=8) @@
1293
		}
1294
		// iconv() available
1295
		else if (function_exists('iconv')) {
1296
			if ($converted_string = @iconv($in_charset, $out_charset.'//TRANSLIT', $string)) {
1297
				switch ($out_charset) {
1298
					case 'ISO-8859-1':
1299
						$converted_string = rtrim($converted_string, "\x00");
1300
						break;
1301
				}
1302
				return $converted_string;
1303
			}
1304
1305
			// iconv() may sometimes fail with "illegal character in input string" error message
1306
			// and return an empty string, but returning the unconverted string is more useful