@@ 1345-1348 (lines=4) @@ | ||
1342 | { |
|
1343 | if (in_array($sniffed, $application_types) || substr($sniffed, 0, 12) === 'application/' && substr($sniffed, -4) === '+xml') |
|
1344 | { |
|
1345 | if (isset($headers['content-type']) && preg_match('/;\x20?charset=([^;]*)/i', $headers['content-type'], $charset)) |
|
1346 | { |
|
1347 | $encodings[] = strtoupper($charset[1]); |
|
1348 | } |
|
1349 | $encodings = array_merge($encodings, $this->registry->call('Misc', 'xml_encoding', array($this->raw_data, &$this->registry))); |
|
1350 | $encodings[] = 'UTF-8'; |
|
1351 | } |
|
@@ 1354-1357 (lines=4) @@ | ||
1351 | } |
|
1352 | elseif (in_array($sniffed, $text_types) || substr($sniffed, 0, 5) === 'text/' && substr($sniffed, -4) === '+xml') |
|
1353 | { |
|
1354 | if (isset($headers['content-type']) && preg_match('/;\x20?charset=([^;]*)/i', $headers['content-type'], $charset)) |
|
1355 | { |
|
1356 | $encodings[] = $charset[1]; |
|
1357 | } |
|
1358 | $encodings[] = 'US-ASCII'; |
|
1359 | } |
|
1360 | // Text MIME-type default |