Date: Wed, 8 Oct 2003 15:27:07 +0800 (CST) From: Cheng-Lung Sung <clsung@dragon2.net> To: FreeBSD-gnats-submit@FreeBSD.org Cc: Cheng-Lung Sung <clsung@tiger2.net> Subject: ports/57732: [patch] add two patches to display Chiense word correctly Message-ID: <20031008072707.92BE8154C7@mail.dragon2.net> Resent-Message-ID: <200310080730.h987UM8k071084@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 57732 >Category: ports >Synopsis: [patch] add two patches to display Chiense word correctly >Confidential: no >Severity: non-critical >Priority: high >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Wed Oct 08 00:30:22 PDT 2003 >Closed-Date: >Last-Modified: >Originator: Cheng-Lung Sung >Release: FreeBSD 4.8-RELEASE-p13 i386 >Organization: FreeBSD @ Taiwan >Environment: System: FreeBSD sungsung.csie.nctu.edu.tw 4.8-RELEASE-p13 FreeBSD 4.8-RELEASE-p13 #3: Wed Oct 8 07:32:16 CST 2003 root@sungsung.csie.nctu.edu.tw:/usr/obj/usr/src/sys/SUNGSUNG i386 any machine which can display Big5 characters >Description: add some patch to display chinese word correctly. In fact, if can not only apply to chinese word, but also other charsets. >How-To-Repeat: None >Fix: diff -ruN /usr/ports/chinese/tin/Makefile tin/Makefile --- /usr/ports/chinese/tin/Makefile Thu Jan 23 21:34:37 2003 +++ tin/Makefile Wed Oct 8 15:18:40 2003 @@ -13,6 +13,8 @@ MAINTAINER= yssu@CCCA.NCTU.edu.tw EXTRA_PATCHES= ${.CURDIR}/files/patch-attrib.c \ + ${.CURDIR}/files/patch-cook.c \ + ${.CURDIR}/files/patch-mail.c \ ${.CURDIR}/files/patch-init.c .include "${MASTERDIR}/Makefile" diff -ruN /usr/ports/chinese/tin/files/patch-cook.c tin/files/patch-cook.c --- /usr/ports/chinese/tin/files/patch-cook.c Thu Jan 1 08:00:00 1970 +++ tin/files/patch-cook.c Wed Oct 8 15:07:01 2003 @@ -0,0 +1,15 @@ +--- src/cook.c.orig Tue Aug 26 20:34:07 2003 ++++ src/cook.c Wed Oct 8 15:05:05 2003 +@@ -719,7 +719,12 @@ + break; /* premature end of file, file error etc. */ + + /* convert network to local charset, tex2iso, iso2asc etc. */ ++#ifndef CHARSET_CONVERSION + process_charsets(&line, &max_line_len, get_param(part->params, "charset"), tinrc.mm_local_charset, CURR_GROUP.attribute->tex2iso_conv && art->tex2iso); ++#else ++ // force to use undeclared_charset first ++ process_charsets(&line, &max_line_len, (CURR_GROUP.attribute->undeclared_charset) ? (CURR_GROUP.attribute->undeclared_charset) : get_param(part->params, "charset"), tinrc.mm_local_charset, CURR_GROUP.attribute->tex2iso_conv && art->tex2iso); ++#endif /* !CHARSET_CONVERSION */ + + len = (int) strlen(line); + diff -ruN /usr/ports/chinese/tin/files/patch-mail.c tin/files/patch-mail.c --- /usr/ports/chinese/tin/files/patch-mail.c Thu Jan 1 08:00:00 1970 +++ tin/files/patch-mail.c Wed Oct 8 15:07:07 2003 @@ -0,0 +1,15 @@ +--- src/mail.c.orig Sun Aug 10 21:27:36 2003 ++++ src/mail.c Wed Oct 8 14:52:42 2003 +@@ -327,7 +327,12 @@ + * + * TODO: change US-ASCII to UTF-8 when NNTP draft becomes RFC + */ ++#ifndef CHARSET_CONVERSION + process_charsets(&r, &r_len, "US-ASCII", tinrc.mm_local_charset, FALSE); ++#else ++ process_charsets(&r, &r_len, (CURR_GROUP.attribute->undeclared_charset) ? (CURR_GROUP.attribute->undeclared_charset) : "US-ASCII", tinrc.mm_local_charset, FALSE); ++#endif /* !CHARSET_CONVERSION */ ++ + group->description = convert_to_printable(r); + } + >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031008072707.92BE8154C7>