Can't decode subject in GB2312



17 years ago
11 years ago


(Reporter: kazhik, Assigned: nhottanscp)



Firefox Tracking Flags

(Not tracked)



(2 attachments)



17 years ago
Subject in GB2312(MIME-encoded) is displayed as garbage on Linux.
Body text has no problem.

Comment 1

17 years ago
Created attachment 63756 [details]
mail file

Comment 3

17 years ago
With the attached testing mail, I did see the problem with the subject display.
However, the testing mail is a mix of Simplied Chinese and Japanese characters.
In this case, it is possible to have this problem: Japanese characters are
mapped to gb2312 codepoints. And please note that the testing mail is a reply mail. 

I don't have any problems when viewing a gb2312 mail sent from mozilla.
This testing mail is sent from Becky!, another possible cause of the problem.

Comment 4

17 years ago
The test case shows that the body is encoded in GB2312 but the
real encoding used for the subject header is Shift_JIS.
Try decoding the Base64 for the header and see which encoding makes sense.
See the attached image below which was obtained when the encoding
was swicthed to Shift_JIS from GB2312.

Comment 5

17 years ago
Created attachment 63833 [details]
The header B64 string decoded as Shift_JIS

The subeject seems to have been in Shift_JIS originally but
was encoded usign BG 2312. How this happened exactly is a mystery
but perhaps you can do this with Becky.

Comment 6

17 years ago
You can set the folder properties encoding to Shift_JIS and
put a checkmark to force that encoding. You will see the 
subject header correctly also this way.

Comment 7

17 years ago
Yes, i can see the Japanese subject after forcing the folder charset to
Shift-JIS, another good reason to have folder charset feature for this kind of
mails. :-)

Comment 8

17 years ago
So the message is broken and the bug is invalid?

Comment 9

17 years ago
My guess is that this is a Becky-side bug. 
Most probably the original message had a Shift_JIS subject 
header and as the user replied to this message using GB2312,
it encoded it without converting it to GB2312. 
If you use Mozilla from the beginning, the subject line
in the image I attached can be encoded OK with BG2312 and
you can read it under that encoding. 

Comment 10

17 years ago
Marking it invalid for now unless there is additinal data
to indicate otherwise.
Last Resolved: 17 years ago
Resolution: --- → INVALID

Comment 11

17 years ago
Verified as such.

Comment 12

17 years ago
Marked it as verified.
Product: MailNews → Core
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.