Closed Bug 119047 Opened 23 years ago Closed 23 years ago

4.x Ja vCard is displayed garbled.

Categories

(MailNews Core :: Internationalization, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED
mozilla0.9.9

People

(Reporter: ji, Assigned: ftang)

Details

(Keywords: intl, regression)

Attachments

(2 files, 1 obsolete file)

*****Observed with 01/09 trunk build******

The Japanese vCard sent with a 4.x mail is displayed garbled.

Steps to reproduce:
1. Send a mail with Japanese vCard from 4.x.
2. View the mail with the latest mozilla build.

Tha Japanese vCard is garbled.
I'll attach a testing mail.
Attached file A testing mail.
Keywords: regression
Status: NEW → ASSIGNED
Because 4.x generated vCard has a wrong charset specification, it says
iso-2022-jp but actual data is Shift_JIS. So we have a fallback code for the
conversion, if iso-2022-jp fails then we use Shift_JIS. It used to work, but I
debugged today and no conversion error is returned even if we feed Shift_JIS
data to ISO-2022-JP converter. It might be some change for the converter
recently, cc to ftang.
It doesn't seem to be related to the converter change.
I can reproduce it with 11/22 build, 11/09 build does not have the problem.
Target Milestone: --- → mozilla0.9.9
Keywords: intl
Nominating for nsbeta1.
Keywords: nsbeta1
nsbeta1+ per triage meeting 
Keywords: nsbeta1nsbeta1+
In nsISO2022JPToUnicodeV2::Convert, it does not goto the error immediately.

http://lxr.mozilla.org/s
eamonkey/source/intl/uconv/ucvja/nsJapaneseToUnicode.cpp#556

556 } else if(*src & 0x80) {
557 *dest++ = 0xFFFD;
558 if(dest >= destEnd)
559 goto error1;
560 } else {


then later in the following code,

938 error1:
939 *aDestLen = dest-aDest;
940 src++;
941 if ((mState == 0) && (src == srcEnd)) {
942 return NS_OK;
943 }
944 *aSrcLen = src - (const unsigned char*)aSrc;
945 return NS_OK_UDEC_MOREOUTPUT;
946 }

the error is not always set. I think this causes the vCard not shown correctly,
because we depends on the error code to re-try conversion with other charset.

Reassign to ftang.


Assignee: nhotta → ftang
Status: ASSIGNED → NEW
accept
Status: NEW → ASSIGNED
Attachment #70341 - Attachment is obsolete: true
Comment on attachment 70351 [details] [diff] [review]
v2 of the patch. handle error for all the cases in ISO2022JP converter

r=nhotta
Attachment #70351 - Flags: review+
Depends on: 104148
No longer depends on: 104148
Blocks: 104148
Comment on attachment 70351 [details] [diff] [review]
v2 of the patch. handle error for all the cases in ISO2022JP converter

sr=jst
Attachment #70351 - Flags: superreview+
Blocks: 104060
No longer blocks: 104148
a=asa (on behalf of drivers) for checkin to 0.9.9
Keywords: mozilla0.9.9+
fixed and checked in.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
No longer blocks: 104060
Verified as fixed with 03/20 builds.
Status: RESOLVED → VERIFIED
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: