【个人收藏】谈谈Unicode编码,简要解释UCS、UTF、BMP、BOM等名词
2007年1月4日 20:11 | by 猢狲
在blog程序的数据库转换的时候遇到这些名词,在网上翻下来的
这是一篇程序员写给程序员的趣味读物。所谓趣味是指可以比较轻松地了解一些原来不清楚的概念,增进知识,类似于打RPG游戏的升级。整理这篇文章的动机是两个问题
问题一:
使用Windows记事本的“另存为”,可以在GBK、Unicode、Unicode big endian和UTF-8这几种编码方式间相互转换。同样是txt文件,Windows是怎样识别编码方式的呢?
我很早前就发现Unicode、Unicode big endian和UTF-8编码的txt文件的开头会多出几个字节,分别是FF、FE(Unicode),FE、FF(Unicode big endian),EF、BB、BF(UTF-8)。但这些标记是基于什么标准呢?
这是一篇程序员写给程序员的趣味读物。所谓趣味是指可以比较轻松地了解一些原来不清楚的概念,增进知识,类似于打RPG游戏的升级。整理这篇文章的动机是两个问题
问题一:
使用Windows记事本的“另存为”,可以在GBK、Unicode、Unicode big endian和UTF-8这几种编码方式间相互转换。同样是txt文件,Windows是怎样识别编码方式的呢?
我很早前就发现Unicode、Unicode big endian和UTF-8编码的txt文件的开头会多出几个字节,分别是FF、FE(Unicode),FE、FF(Unicode big endian),EF、BB、BF(UTF-8)。但这些标记是基于什么标准呢?
【个人收藏】获得本页面URL地址的几个个JS代码
2006年12月30日 19:53 | by 猢狲
代码1:
代码2:
<script>
function selecturl(){
z=document.body.createTextRange();
z.moveToElementText(selecturlDiv);
z.select();
}
</script>
<span onmousemove='selecturl()' id=selecturlDiv><script>document.write(location.href)</script>
function selecturl(){
z=document.body.createTextRange();
z.moveToElementText(selecturlDiv);
z.select();
}
</script>
<span onmousemove='selecturl()' id=selecturlDiv><script>document.write(location.href)</script>
代码2:
【个人收藏】各大搜索引擎网站登录入口 01.14更新
2006年12月28日 19:41 | by 猢狲
【个人收藏】网页精华代码集
2006年12月6日 12:30 | by 猢狲
1. 将彻底屏蔽鼠标右键
oncontextmenu="window.event.returnvalue=false"
<table border oncontextmenu=return(false)><td>no</table> 可用于Table
2. 取消选取、防止复制
<body onselectstart="return false">
3. 不准粘贴
onpaste="return false"
4. 防止复制
oncopy="return false;" oncut="return false;"
oncontextmenu="window.event.returnvalue=false"
<table border oncontextmenu=return(false)><td>no</table> 可用于Table
2. 取消选取、防止复制
<body onselectstart="return false">
3. 不准粘贴
onpaste="return false"
4. 防止复制
oncopy="return false;" oncut="return false;"
【个人收藏】常用的网页广告代码
2006年12月5日 12:14 | by 猢狲
效果演示:
http://www.makewing.com/lanren/js/01/index.htm
http://www.makewing.com/lanren/js/02/index.htm
http://www.makewing.com/lanren/js/03/index.htm
http://www.makewing.com/lanren/js/04/index.htm
http://www.makewing.com/lanren/js/05/index.htm
http://www.makewing.com/lanren/js/06/index.htm
http://www.makewing.com/lanren/js/07/index.htm
http://www.makewing.com/lanren/js/08/index.htm
http://www.makewing.com/lanren/js/09/index.htm
http://www.makewing.com/lanren/js/10/index.htm
http://www.makewing.com/lanren/js/11/index.htm
http://www.makewing.com/lanren/js/12/index.htm
http://www.makewing.com/lanren/js/13/index.htm
http://www.makewing.com/lanren/js/14/index.htm
http://www.makewing.com/lanren/js/15/index.htm
http://www.makewing.com/lanren/js/16/index.htm
http://www.makewing.com/lanren/js/01/index.htm
http://www.makewing.com/lanren/js/02/index.htm
http://www.makewing.com/lanren/js/03/index.htm
http://www.makewing.com/lanren/js/04/index.htm
http://www.makewing.com/lanren/js/05/index.htm
http://www.makewing.com/lanren/js/06/index.htm
http://www.makewing.com/lanren/js/07/index.htm
http://www.makewing.com/lanren/js/08/index.htm
http://www.makewing.com/lanren/js/09/index.htm
http://www.makewing.com/lanren/js/10/index.htm
http://www.makewing.com/lanren/js/11/index.htm
http://www.makewing.com/lanren/js/12/index.htm
http://www.makewing.com/lanren/js/13/index.htm
http://www.makewing.com/lanren/js/14/index.htm
http://www.makewing.com/lanren/js/15/index.htm
http://www.makewing.com/lanren/js/16/index.htm







