不知道用iconv是否可行,帮你找了一下,http://www.newasp.net/tech/php/13333.html 这里好像有,自己没有试过,那个可能是自己实现的功能。

解决方案 »

  1.   

    没弄过,iconv不行可以试试mb_顶楼主,一下
      

  2.   

    参考这个:http://blog.chinaunix.net/u/29134/showart_358931.html
      

  3.   

    $str=preg_replace("/\\\u(.{4})/","\".unicode2gb2312('\\1').\"",$str);
    $str = "\$str=\"$str\";";eval($str);
    print $str;
    print unicode2gb2312("7D20");
    function unicode2gb2312($str) {
    //  $bs = split('\u',$str);
      $bs=$str;
      $c = "";
    //  for($i = 1; $i < count($bs); $i++) {
        $c .= chr(hexdec(substr($bs,2)));
        $c .= chr(hexdec(substr($bs,0,2)));
    //  }
      $c = iconv('UTF-16', 'GB2312', $c);
    //  echo $c;
      return $c;
    }