Closed Bug 160801 Opened 22 years ago Closed 22 years ago

GB18030 is used for MIME encoded Chinese attachment filename

Categories

(MailNews Core :: Internationalization, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla1.2alpha

People

(Reporter: ji, Assigned: nhottanscp)

Details

(Keywords: intl)

Attachments

(1 file, 1 obsolete file)

Build: 08/02/02 branch
OS: Simplified Chinese 98/W2K/XP

When attachment filename is in Simplified Chinese, the charset used for filename
mime-encode is gb18030, not gb2312.

Steps to reproduce:
1. Open a mai compose window
2. Attach a file with filename in Simplified Chinese.
3. Send it out to yourself in gb2312.
4. After received, view message source on this mail.
Observe the attachment filename part.
Nominating.
Keywords: intl, nsbeta1
Summary: GB18030 is used for MIME encoded Chinese attachment filename → GB18030 is used for MIME encoded Chinese attachment filename
For file name, the system charset is used. But the sender's system charset may
not be recoginzed by receivers environment. I think we want to try mail charset
to encode file name first. If it fails then we can fallback to file system charset.
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla1.2alpha
Depends on: 157673
Try main body's charset first before using local system charset. 
This is to avoid sending a charset which user may not handle properly (e.g.
GB18030, MacRoman).
Attachment #94244 - Attachment is obsolete: true
Comment on attachment 94264 [details] [diff] [review]
Added null check for attachment charset.

looks good. R=ducarroz
Attachment #94264 - Flags: review+
+      PR_FREEIF(encodedRealName);
+      encodedRealName = PL_strdup(real_name);
you an just use PR_Free here - it checks for null, and you don't need the
nulling out feature of PR_FREEIF because you're just assigning it on the next
line. Other than that, looks fine.
Comment on attachment 94264 [details] [diff] [review]
Added null check for attachment charset.

sr=bienvenu, if you change that PR_FREEIF to PR_Free
Attachment #94264 - Flags: superreview+
checked in to the trunk
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Jeesun, could you please verify the fix on the today's trunk build on Simplified
Chinese system? Thanks. qa contact to jeesun.
QA Contact: marina → jeesun
Below is some test results with mail clients:
Outlook Express: can handle Chinese attachment file MIME encoded either with
gb18030 and gb2312
Chinese Hotmail: can handle both
Sohu webmail: can handle gb2312, but can't handle gb18030
Sina.com.cn webmail: can't handle gb2312, but can handle gb18030
Another info: Outlook Express 6 on Windows XP machine uses gb2312 for attachment
filename by default, it also gives gb18030 and HZ as other options on compose
window.
Blocks: 157673
No longer depends on: 157673
No longer blocks: 157673
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: