Closed Bug 125080 Opened 23 years ago Closed 22 years ago

mailto url with raw non-ASCII subject and mail body is not working

Categories

(MailNews Core :: Internationalization, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: ji, Assigned: darin.moz)

References

Details

(Keywords: intl, regression, Whiteboard: [adt2 RTM])

Attachments

(3 files)

mailto url with raw Simplified Chinese subject and mail body is working on Communicator Simplified Chinese 4.51, but is broken on mozilla. Steps to reproduce: 1. Have a gb2312 page containing a link pointing to a mailto url with raw Simplified Chinese subject and mail body. 2. Open the page, click on the link, the Chinese subject and mail body are corrupted on mail compose window. A test case will be attached later.
Nominating for nsbeta1.
Keywords: intl, nsbeta1
It's working on NS 6.2.1.
Keywords: regression
Is the problem specific to gb2312?
It seems broken with any non-ASCII.
Summary: mailto url with raw Simplified Chinese subject and mail body is not working → mailto url with raw non-ASCII subject and mail body is not working
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla1.0
it work fine in 2002012806 window build. so the problem happen after that. nsbeta1+ per triage meeting.
Keywords: nsbeta1nsbeta1+
In NS_MakeAbsoluteURIWithCharset(), we generate raw UTF-8 for the mailto URI and that is expected by the mail code (it was working that way in NS6.2). Currently, it looks like the string is infrated to PRUnichar* then converted to UTF-8 in somewhere, so the result seems to be double converted, one character like 'á' turns to 4 bytes instead of 2 bytes. It happens somewhere between NS_MakeAbsoluteURIWithCharset() and the mail code which handles mailto url. I think it can be avoided by escaping the UTF-8 mailto URI at NS_MakeAbsoluteURIWithCharset, or find the place where the data is converted incorrectly, cc to darin.
OS: Windows XP → All
Hardware: PC → All
my patch for bug 124042 is going to make NS_MakeAbsoluteURIWithCharset obsolete since necko will start accepting UTF-8 URL strings. this means that all of the per protocol URL escaping, such as the javascript \uxxxx escaping will be moved into the respective protocol handlers. NS_NewURI(const char *aSpec, nsIURI *aBaseURI) is becoming: NS_NewURI(const nsAUTF8String &aSpec, const char *aOriginCharset, nsIURI *aBaseURI); where aOriginCharset corresponds to the charset of the document from which this URL string originated. so, you might want to mark this bug as blocked by bug 124042.
Depends on: 124042
Is there any special handling needed for mailto URI? I assume not, mailto URI already in raw (unescaped) UTF-8.
nhotta: sounds right to me.
The test pages works fine with darin's build: ftp://ftp.mozilla.org/pub/mozilla/nightly/experimental/darin
Test pages work fine on 03-06 trunk build / WinME-JA and Mac OS 10.1.3.
Reassign to darin.
Assignee: nhotta → darin
Status: ASSIGNED → NEW
Fixed in the trunk by bug 124042.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Verified as fixed with 03/20 builds.
Status: RESOLVED → VERIFIED
I just tried the latin-1 attachment on Mozilla 1.0 RC3 and also on netscape 6.2.1 both on Win2k, and the extended character e-acute does not get passed to the subject line in either of these. FYI I'm only here because I was trying to pass a body text with the same %E9 character and couldn't get it to work.
Status: VERIFIED → REOPENED
Resolution: FIXED → ---
reporter, could you please attach the problematic mail because i can not see it happening in 2002-05-24 build.Thanks.
Status: REOPENED → ASSIGNED
Target Milestone: mozilla1.0 → mozilla1.0.1
removing nsbeta1+, as it was carried over from anothe rcomponent. ftang - pls work with gagan, and the necko triage team to asses whether this is work they can resolved for MachV final release.
Keywords: nsbeta1+nsbeta1
Whiteboard: [adt2 RTM]
back to untargeted for now.
Target Milestone: mozilla1.0.1 → ---
WORKSFORME Netscape 7.0 Win98
Status: ASSIGNED → RESOLVED
Closed: 23 years ago22 years ago
Resolution: --- → WORKSFORME
Product: MailNews → Core
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: