荔园在线
荔园之美,在春之萌芽,在夏之绽放,在秋之收获,在冬之沉淀
[回到开始]
[上一篇][下一篇]
发信人: dgwang.bbs@bbs.qxntc.edu.cn (DG大哥), 信区: InstallBBS
标 题: 台湾组转信标题乱码处理
发信站: 笔山书院_BBS (Wed Nov 10 08:44:59 2004)
转信站: SZU!news.szu.edu.cn!news.uestc.edu.cn!QXNTC
ytht的代码,其他代码也可以参考一下:
RCS file: /home/cvs/bbs/innbbsd/receive_article.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- bbs/innbbsd/receive_article.c 2004/11/09 11:20:23 1.2
+++ bbs/innbbsd/receive_article.c 2004/11/09 14:22:58 1.3
@@ -99,6 +99,12 @@
if (strlen(SUBJECT) > 255)
FAILED;
str_decode(conv_buf, SUBJECT);
+ if(strstr(SUBJECT,"=?big5?") || strstr(SUBJECT,"=?Big5?") ||
+ strstr(SUBJECT,"=?BIG5?") ){
+ int len;
+ len=strlen(conv_buf);
+ big2gb(conv_buf,&len,0);
+ }
if (fprintf(fhfd, "%s%s, %s%s\n", FromTxt, FROM, BoardTxt, board) == EOF
|| fprintf(fhfd, "%s%.70s\n", SubjectTxt, conv_buf) == EOF
|| fprintf(fhfd, "%s%.43s (%s)\n", OrganizationTxt, SITE,
@@ -848,6 +854,13 @@
header.filetime = atoi(name + 2);
fh_setowner(&header, userid, 0);
str_decode(conv_buf, SUBJECT);
+ if(strstr(SUBJECT,"=?big5?") || strstr(SUBJECT,"=?Big5?") ||
+ strstr(SUBJECT,"=?BIG5?") ){
+ int len;
+ len=strlen(conv_buf);
+ big2gb(conv_buf,&len,0);
+ }
strsncpy(header.title, conv_buf, sizeof (header.title));
fh_find_thread(&header, board);
/* if append record record, should return fail message */
--
※ 来源:.笔山书院 BBS bbs.qxntc.edu.cn.[FROM: 218.194.249.*]
[回到开始]
[上一篇][下一篇]
荔园在线首页 友情链接:深圳大学 深大招生 荔园晨风BBS S-Term软件 网络书店