作者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