unicode文件转中文

来源:互联网 发布:淘宝网家用拖鞋 编辑:程序博客网 时间:2024/05/02 00:26

\u5973\u5927 -> 女大

方式一

安装java

native2ascii -reverse -encoding gb2312 src.txt dst.txt

方式二

<script>    function ascii2native(){        var character=document.getElementById("src").value.split("\\u");        var native1=character[0];        for(var i=1;i<character.length;i++){            var code=character[i];            native1 += String.fromCharCode(parseInt("0x"+code.substring(0,4)));            if(code.length>4){                native1+=code.substring(4,code.length);            }        }        document.getElementById("dst").value=native1;    }</script>
0 0
原创粉丝点击