Bug 23858 - message type should allow types other than "text" or "html", to support GBK encoding
Summary: message type should allow types other than "text" or "html", to support GBK e...
Status: RESOLVED FIXED
Alias: None
Product: Taglibs
Classification: Unclassified
Component: Mailer Taglib (show other bugs)
Version: 1.1
Hardware: Other other
: P3 normal with 3 votes (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords: PatchAvailable
: 18614 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-10-16 09:05 UTC by Bin Sun
Modified: 2004-11-16 19:05 UTC (History)
2 users (show)



Attachments
Patches to resolve this issue. (5.83 KB, patch)
2003-12-10 07:29 UTC, Martin Cooper
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Bin Sun 2003-10-16 09:05:08 UTC
I can't use mailer taglib to send mails with GBK encoding. This forced me to 
send pure English mail to my customers who could only read Chinese mails.

I found the source code fragment:
 * $Header: /home/cvs/jakarta-
taglibs/mailer/src/org/apache/taglibs/mailer/MailTag.java,v 1.9 2002/10/31 
05:01:27 glenn Exp $

line 738~743:
    public final void setType(String value) {
	if (value.equalsIgnoreCase("html"))
	    type = "text/html";
	else
	    type = "text/plain";
    }

this restricted the message type only two options: "text/html", "text/plain"

But I do need "text/html;charset=GBK"!
Comment 1 Martin Cooper 2003-12-10 07:29:57 UTC
Created attachment 9484 [details]
Patches to resolve this issue.
Comment 2 Martin Cooper 2003-12-10 07:33:27 UTC
Added patches to support the addition of a 'charset' attribute to the <message> 
tag, to explicitly add a character set to the message content type.
Comment 3 Martin Cooper 2003-12-10 07:39:55 UTC
*** Bug 18614 has been marked as a duplicate of this bug. ***
Comment 4 Martin Cooper 2004-01-29 06:18:42 UTC
Fixed in the 20040129 nightly build.