bugzilla之中文化

最近还在忙这个
不知道换了个公司,我还是否需要这样做
不过据我推测,中国软件公司员工的英语水平应该都挺高
anyway,记一下思路。

三个问题:
1. Bugzilla/BugMail.pm需要打个补丁
--- Bugzilla/BugMail.pm.bak     2006-12-06 09:19:08.000000000 +0800
+++ Bugzilla/BugMail.pm 2006-12-06 17:55: 03.000000000 +0800
@@ -46,6 +46,8 @@
 use MIME::Parser;
 use Mail::Address;
 
+use Encode qw(encode_utf8);
+
 # We need these strings for the X-Bugzilla-Reasons header
 # Note: this hash uses "," rather than "=>" to avoid auto-quoting of the LHS.
 my %rel_names = (REL_ASSIGNEE          , "AssignedTo",
@@ -636,7 +638,7 @@
     my $headers;
 
     if (Param('utf8') and (!is_7bit_clean($header) or !is_7bit_clean($body))) {
-        ($headers, $body) = encode_message($msg);
+        ($headers, $body) = encode_message(encode_utf8($msg));
     } else {
         my @header_lines = split(/\n/, $header);
         $headers = new Mail::Header \@header_lines, Modify => 0;

2. 网上现有最新的汉化包是2.20, 内容和正在使用的2.22有差距。使用中文界面时,已知的可导致的问题有,不能删除产品和模块。

3. 如果bug的摘要和附加评论是中文,将是乱码。解决思路是这样。首先把数据库里的表的所有列的字符集改为utf8
alter table xxx convert to charset utf8;
然后修改Bugzilla/Bug.pm,在刚刚连上数据库后,多执行一句query "set names utf8;"
然后把查询所得结果(raw utf8)转化成perl internal utf8, decode_utf8().

Comments

Anonymous said…
您好,我最近正在试着配置Bugzilla,也出现了摘要和描述乱码的问题,它们在mysql数据库中的存储是正确的,我想您的思路给出了解决这个问题的正确方向,由于我对perl不是很熟,能否请大侠给出具体的解决方法,非常感谢!
r0bertz said…
好歹留个联系方式,或者给我发个邮件吧
Anonymous said…
好的,我给您发邮件了.
Anonymous said…
您好,我前几天给您发了邮件,但不幸正好赶上这两天海底光缆断掉,不知您是否收到,我又给您发了一封,急切切盼望您的回复.
r0bertz said…
你发到哪个邮箱了?
Anonymous said…
robert.zhangle@gmail.com,您没收到吗?我的邮箱是gqlv@vandagroup.com.cn

Popular posts from this blog

The diff between the original SEC complaint against Ripple and the amended one

Send $SGB (Songbird) to another wallet using a script

Rippled thread cpu usage