[escape] ISO Latin字符集对指定的字符串进行编码,不会被编码的字符[ @ * / +] [encodeURI] UTF-8字符集对指定的字符串进行编码 [encodeURIComponent] UTF-8字符集对指定的字符串进行编码,[支持更多的字符] 当源与目标页都为同一字符集时,并不需要转为UTF-8,这时可用[escape] 当源与目标页字符集不同时,需要对源字符转为目标字符,为统一可考虑使用UTF-8 new String(request.getParameter("PARAM_NAME").getBytes("源页编码"), "UTF-8")
推荐阅读
extjs fckeditor集成代码
复制代码 代码如下:{ xtype : "textarea", name : "content", anchor : '97%', height : 400, id : "content", fieldLabel : "内容", listeners : { "render" : function(f) { fckEditor = new FCKeditor("content>>>详细阅读
本文标题:JavaScript 字符编码规则
地址:http://www.17bianji.com/kaifa2/JS/28728.html
1/2 1