php 下面的编码转换类
[ 2007-03-06 13:56:46 | 作者: admin ]
p.s. 以前刚发现的时候,嗷嗷直叫,好东西应该大家分享
utf8->gb2312
gb2312->utf8
utf8->big5
big5->utf8
gb2312->big5
big5->gb2312
例子:
===================
Click Here To Download
utf8->gb2312
gb2312->utf8
utf8->big5
big5->utf8
gb2312->big5
big5->gb2312
例子:
===================
<?php
echo "原文为:我爱你<br>";
include("class.Chinese.php");
$chs = new Chinese("GB2312","BIG5","我爱你");
echo "转换后的结果:".$chs->ConvertIT();
?>
echo "原文为:我爱你<br>";
include("class.Chinese.php");
$chs = new Chinese("GB2312","BIG5","我爱你");
echo "转换后的结果:".$chs->ConvertIT();
?>
Click Here To Download
[最后修改由 admin, 于 2007-03-06 15:55:51]
评论Feed: http://blog.xg98.com/feed.asp?q=comment&id=820
这篇日志没有评论。
此日志不可发表评论。