$str = "涨·跌停板";
echo $str;输出的就是{涨·跌停板}

解决方案 »

  1.   

    板是16进制的unicode编码php应该有相应的函数吧
    就是unicode编码的正反转换函数js里的话javascript:alert(String.fromCharCode(parseInt("6da8", 16)))这个从地址栏上运行就可以了String.fromCharCode是把16进制的unicode码转回来
    parseInt("6da8", 16) 是把6da8转换成10进制
      

  2.   

    参考这个 http://www.java2000.net/viewthread.jsp?tid=102
      

  3.   

    怎么把 &#21326&#21335 变成 华南?3楼http://topic.csdn.net/u/20080331/14/012e0988-5a54-4831-b88b-7c34d4a4f522.html
      

  4.   

    21335 这个是十进制的 unicode 编码啊。。
    直接用Script.fromCharCode函数转就可以啦可以从地址栏直接运行下面代码
    javascript:alert(String.fromCharCode.apply(null, '&#21326&#21335'.split(/&#/g)));
      

  5.   

    PHP有个函数html_entity_decode,但不能解决双字节问题.网上搜索到一些解决方案,但对我这里给出的例子没辙,望高手赐教!
      

  6.   

    我觉得你应该把最后的解决方法贴出来供别人参考。
    <?php
    function utf8_replaceEntity($result){
    $value = (int)hexdec($result[1]);
    $string = '';
    $len = round(pow($value,1/8));
    for($i=$len;$i>0;$i--){
    $part = ($value & (255>>2)) | pow(2,7);
    if ( $i == 1 ) $part |= 255<<(8-$len);
    $string = chr($part) . $string;
    $value >>= 6;
    }
    return $string;
    }function utf8_html_entity_decode($string){
    return preg_replace_callback(
    '/&#([x0-9a-f]+);/u',
    'utf8_replaceEntity',
    $string
    );
    }
    $string = '{&#x6da8;&#xb7;&#x8dcc;&#x505c;&#x677f;}';
    $string = utf8_html_entity_decode($string);
    echo $string;
    ?>