作者MayDayLove (神阿!让我上科大~~~)
看板PttSuggest
标题[转录][建议] RFC 2045 support
时间Fri Mar 28 20:40:31 2003
本文引用 gslin 在 installbbs 版所提供的资讯
本文引用
[email protected] 在 SYSOP 板所提供的资讯。
依据 RFC 2045 (Nov 1996) 内对於 MIME 相关的说明,我们强烈建议修改
bbslink.c,让新版的 tin 以及 Outlook Express 的阅读更正常。
以现在的情形,之前的 BBS 在进行转信的时,并没有按照标准的 news 格式进
行,这个问题在 BBS 内不会出现,但是如果是由直接阅读 news 的软体来看,
如 unix 的 tin 或是 windows 的 outlook,就会有变成乱码的问题。
如下图所出现的情况。
http://www.wctang.idv.tw/pic/prob1.png
http://cnal.csie.nctu.edu.tw/~paulliu/oe.jpg
而这个情况,是可以用简单的方法来补救的。
对於繁体中文 BBS 而言,一个简单的解决方式是在每篇发出文章的 Header 里面
加上下面三行:
Mime-Version: 1.0
Content-Type: text/plain; charset="big5"
Content-Transfer-Encoding: 8bit
所以 bbslink.c 的 post_article() 可以加入下面三行,以符合 RFC 2045 所提
供的建议。
if (NEWSFEED == REMOTE)
{
...
}
else
{
...
fprintf(NNTPwfp, "Message-ID: <%s>\r\n", sover->msgid);
+ fprintf(NNTPwfp, "Mime-Version: 1.0\r\n");
+ fprintf(NNTPwfp, "Content-Type: text/plain; charset=\"big5\"\r\n");
+ fprintf(NNTPwfp, "Content-Transfer-Encoding: 8bit\r\n");
fprintf(NNTPwfp, "X-Filename: %s/%s\r\n", sover->board, sover->filename);
}
改完後请别忘记重新 compile 并安装新的 bbslink
谢谢..
--
╭─╮
╰ ╯ ███◣ ██◣ █ ◣ ██◣ ██◣ █ ◣ █ ██◣ █ ◣ ██◣
╭─╮ █ █ █ █▄█ ███ █ █ █▄█ ███ █ █ █ █ █ █▅▅
╰ ╯ █ █ █ █ █ █ ██◤ █ █ █ ██▋███ ◥█◤ █▄▄
--
※ 发信站: 批踢踢实业坊(ptt.csie.ntu.edu.tw)
◆ From: 202.178.146.200