改为这样试试,
$sql="insert into test(name) values('$str')";
请问你简体是用什么工具转成繁体的,怎么转成这个样的,
你可以用frontpage或金山快译等转换成这样:
$str='紀璞';这才是繁体。

解决方案 »

  1.   

    如果不想写自己写转换的类,就下载一个吧!很好用的!嘿嘿!我的就是down的现成的!关注
      

  2.   

    把整个代码贴出来啊,看看第8行是什么
    一个转换函数<? 
    /*********************************************************************** 
    Written by caocao 
    [email protected] 
    http://caocao.oso.com.cn With the help of Keyes 
    [email protected] 
    http://my-wjl.scu.edu.cn/~Keyes 
    ***********************************************************************/ 
    function isgb($code) 

    if (strlen($code)>=2) 

    $code=strtok($code,""); 
    if ((ord($code[0]) < 161)||(ord($code[0]) >= 247)) 

    return (0); 

    else 

    if ((ord($code[1]) <= 161)||(ord($code[1]) >= 254)) 

    return (0); 

    else 

    return (1); 



    else 

    return (1); 

    } function gboffset($code) 

    if (strlen($code) >= 2) 

    $code=strtok($code,""); 
    return ((ord($code[0]) - 161) * 94 + (ord($code[1]) - 161)); 

    else 

    return(-1); 

    } function wordtostring($code) 

    return (chr(hexdec(substr($code,0,2))).chr(hexdec(substr($code,2,2)))); 
    } function gbtobig5($code) 

    include "data_gb.php"; 
    $output=""; 
    $length=strlen($code); 
    $code=strtok($code,""); 
    $idx=0; 
    while ($idx < $length) 

    $tmpStr=$code[$idx].$code[$idx+1]; if (isgb($tmpStr)) 

    $offset=gboffset($tmpStr); 
    if (($offset >= 0)||($offset <= 8177)) 

    $output.=wordtostring($gborder[$offset]); 
    $idx++; 

    else 

    $output.= $code[$idx]; 


    else 

    $output.= $code[$idx]; 

    $idx++; 

    return ($output); 
    }; 
    ?> 
      

  3.   

    谢谢楼上3为哥们:   我是用简体写的代码,然后转换成big5的。转换工具为convertz43
    你们可以试试。。挺怪的。
      

  4.   

    这样的问题在以前转换YaBB的语言文件时候也遇到过,那时候用的是金山词霸的转换工具,后来发现是转换后有些字符变成了数据库的特殊字符。用addslashes函数处理一下就好了。
      

  5.   

    include "data_gb.php"; 
    哪里有啊?