如下是base64编码:
var str_base64 = "CgkJCgkJCQk8Y29uZGl0aW9ucyB0eXBlPSJBTkQiPgoJCQkJCTxzeXNDb25kaXRpb25zIHR5cGU9Inx8Ij4KCQkJCQk8c3lzQ29uZGl0aW9uIG5hbWU9ItDCzsS1tSIgZXhwcmVzc2lvbj0iS0dselRtVjNSRzlqS0NrcElBPT0iLz4KCQkJCQk8c3lzQ29uZGl0aW9uIG5hbWU9IrWxx7C0psDtyMsiIGV4cHJlc3Npb249IktHbHpRM1Z5VlhObGNpZ3BLU0E9Ii8+CgkJCQkJPC9zeXNDb25kaXRpb25zPgoJCQkJPC9jb25kaXRpb25zPgoJCQk=";
项目引入了[base64.js][1]
var str = Base64.decode(str_base64 );
console.log(str);
输出内容如下:(**name中文乱码**)
//<conditions type="AND">
// <sysConditions type="||">
// <sysCondition name="ÐÂÎĵµ" expression="KGlzTmV3RG9jKCkpIA=="/>
// <sysCondition name="µ±ǰ´¦ÀíÈË" expression="KGlzQ3VyVXNlcigpKSA="/>
// </sysConditions>
//</conditions>
怎么通过js解决乱码问题??? Thanks
添加回答
举报
0/150
提交
取消