文章分类 -  字符编码

摘要:原文出处:http://hi.baidu.com/bookun/item/a92138c3ebe1eb0fad092f2b网上查到的全都是escape,和需要的编码不是一回事,好不容易找到的结果 保存下来以备以后使用js对文字进行编码涉及3个函数:escape,encodeURI,encodeURIComponent,相应3个解码函数:unescape,decodeURI,decodeURIComponent1、 传递参数时需要使用encodeURIComponent,这样组合的url才不会被#等特殊字符截断。例如:<script language="javascript&qu 阅读全文
posted @ 2012-09-11 20:35 bourneli 阅读(245) 评论(0) 推荐(0)
摘要:GBK编码规范:http://zh.wikipedia.org/wiki/GBKGBK编码表:http://www.360doc.com/content/05/0801/15/305_4166.shtml 阅读全文
posted @ 2012-06-16 19:58 bourneli 阅读(449) 评论(0) 推荐(0)
摘要:原文转自:http://www.joelonsoftware.com/articles/Unicode.html此文章是2003年的文章,快10年了,但是内容还没有过时,的确是每个程序员都需要知道的事情。Ever wonder about that mysterious Content-Type tag? You know, the one you're supposed to put in HTML and you never quite know what it should be?Did you ever get an email from your friends in Bul 阅读全文
posted @ 2012-04-13 20:06 bourneli 阅读(408) 评论(0) 推荐(1)