<?php
$charsets = array(
'iso-8859-1', // default
'iso-8859-2',
'iso-8859-15',
'utf-8'
);
$pref = http_negotiate_charset($charsets, $result);
if (strcmp($pref, 'iso-8859-1')) {
iconv_set_encoding('internal_encoding', 'iso-8859-1');
iconv_set_encoding('output_encoding', $pref);
ob_start('ob_iconv_handler');
}
print_r($result);
?> |