$ch = "你"; $ch = iconv("UTF-8","GB2312",$ch); $xx= sprintf("%X",ord($ch[0])*0x100+ord($ch[1])); echo $xx;
输出:C4E3