Support jOOmla! Autoit!
 
utf-8页面调用Gb2312DZ!的编码问题 输出PDF 打印 E-mail
Author Author: Autoit | Date Date:2006-06-12 | View Count View: 8812 | Digg Count Digg: 52

就是其JS在输出的时候进行编码转换而已, 可以利用Php的 iconv 库:

将下列函数加在DZ!的 javascript.php 的末尾 ?> 的上行

 
function gb2312_to_utf8 ($str) {
 
$str = iconv("GB2312","UTF-8",$str);
 
return $str;
 
}
 

再要输出的字段上加上这个函数调用即可,例如调用最新贴:

~126-133 line

 
echo "document.writeln(\"$prefix "
 
...
 
."<br />\");\r\n";
 

可以直接改写成:

 
echo gb2312_to_utf8("document.writeln(\"$prefix&nbsp;"
 
...
 
."<br />\");\r\n");

#End#


Permanent URL: http://www.autoit.cn/index.php/content/view/37/25.html

Shares: Google书签 Yahoo书签 雅虎收藏夹 365Key网摘 新浪ViVi 百度收藏 天极网摘 diglog 和讯网摘 POCO网摘 YouNote网摘 博拉网 天下图摘 spurl blogmarks BlinkList reddit digg Del.icio.us   |  Tags: 编码  DZ  

 
各模块所使用不同图片效果的方法   放置 Google's Ad 所制作的一个N简单的模块