My script keeps displaying the names in Chinese, here's what I'm using;
$charcount = unpack( "c", substr( $buf, $start, 1 ) );
$start = $start+1;
for($MorzE=0; $i<$charcount[1]; $i++)
{
$charid = unpack( "N", substr( $buf, $start, 4 ) );
$start = $start+4;
$namelarge = unpack( "c*", substr( $buf, $start, 1 ) );
$start = $start+1;
$name = iconv( "UTF-16", "UTF-8", substr( $buf, $start, $namelarge[1] ) );
$start = $start+$namelarge[1];
if ($charid[1] == $_SESSION['charid'])
{
$select[$i] = ' selected="selected"';
}
$roles_acc .= <<<HTML
<option value='{$charid[1]}'{$select[$i]}>{$name}</option>\n
<select name="role">{$roles_acc}</select><br /><br />
My Database is set to General utf-8, I have tried changing that to several different types. I've also tried adding
header('Content-Type: text/html; charset=utf-8');
But it's still displaying in Chinese, any idea why?