解决webalizer 汉化后图表中乱码的问题
代码如下(webalizer_patch.pl):
#!/usr/bin/perl
###############################################################################
# webalizer_patch.pl
# 原作:http://mail.tses.tcc.edu.tw/nuke/sections.php?op=viewarticle&artid=139
# 修改:陶然 <taoran@taoran.net>
# 功能: 解决HTML汉化后图表中乱码的问题
# 方法:图表中乱码改用英文显示就正常了
# 需要修改: graphs.c output.c webalizer_lang.h lang.h
#
# tar zxf webalizer-2.01-10-src.tgz
# cd webalizer-2.01-10
# ./configure --with-language=simplified_chinese
# perl /path/of/webalizer_patch.pl ./
# make
# make install
#
###############################################################################
$file_graph = "$ARGV[0]/graphs.c";
if(!(-e $file_graph)) {
print "error open $file_graph
";
print "Usage:
perl $0 DIR
";
#DIR是源文件目录,比如 ./
exit;
}
#把图表中的月份和注释改成英文
@old_var = ("msg_h_hits",
"msg_h_pages",
[...]
