编码转换测试程序
By
admin
at 2017-12-10 • 0人收藏 • 1270人看过
chkStr=function(str){ console.log("936转65001",string.fromto(str,936,65001)) console.log("936转950",string.fromto(str,936,950)) console.log("936转1200",string.fromto(str,936,1200)) console.log("936转0",string.fromto(str,936,0)) console.log("950转65001",string.fromto(str,950,65001)) console.log("950转936",string.fromto(str,950,936)) console.log("950转1200",string.fromto(str,950,1200)) console.log("950转0",string.fromto(str,950,0)) console.log("65001转936",string.fromto(str,65001,936)) console.log("65001转950",string.fromto(str,65001,950)) console.log("65001转1200",string.fromto(str,65001,1200)) console.log("65001转0",string.fromto(str,65001,0)) console.log("1200转936",string.fromto(str,1200,936)) console.log("1200转950",string.fromto(str,1200,950)) console.log("1200转65001",string.fromto(str,1200,65001)) console.log("1200转0",string.fromto(str,1200,0)) console.log("0转65001",string.fromto(str,0,65001)) console.log("0转950",string.fromto(str,0,950)) console.log("0转936",string.fromto(str,0,936)) console.log("0转1200",string.fromto(str,0,1200)) console.log("fromUnicode",string.fromUnicode(str)) console.log("Unicode转936",string.fromUnicode(str,936)) console.log("Unicode转950",string.fromUnicode(str,950)) console.log("Unicode转65001",string.fromUnicode(str,65001)) console.log("Unicode转1200",string.fromUnicode(str,1200)) }
用上面看哪个是你想要的转换类型...
登录后方可回帖