4.x Ja vCard is displayed garbled.

VERIFIED FIXED in mozilla0.9.9

Status

MailNews Core
Internationalization
VERIFIED FIXED
17 years ago
10 years ago

People

(Reporter: ji, Assigned: Frank Tang)

Tracking

({intl, regression})

Trunk
mozilla0.9.9
x86
Windows 2000
intl, regression

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments, 1 obsolete attachment)

(Reporter)

Description

17 years ago
*****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.
(Reporter)

Comment 1

17 years ago
Created attachment 64188 [details]
A testing mail.
(Reporter)

Updated

17 years ago
Keywords: regression

Updated

17 years ago
Status: NEW → ASSIGNED

Comment 2

17 years ago
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.

Comment 3

17 years ago
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.

Updated

17 years ago
Target Milestone: --- → mozilla0.9.9

Updated

17 years ago
Keywords: intl
(Reporter)

Comment 4

17 years ago
Nominating for nsbeta1.
Keywords: nsbeta1
(Assignee)

Comment 5

17 years ago
nsbeta1+ per triage meeting 
Keywords: nsbeta1 → nsbeta1+

Comment 6

17 years ago
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
(Assignee)

Comment 7

17 years ago
accept
Status: NEW → ASSIGNED
(Assignee)

Comment 8

17 years ago
Created attachment 70341 [details] [diff] [review]
patch v1 to return error code when we hit 8 bits data in ISO2022 converter
(Assignee)

Updated

17 years ago
Attachment #70341 - Attachment is obsolete: true
(Assignee)

Comment 9

17 years ago
Created attachment 70351 [details] [diff] [review]
v2 of the patch. handle error for all the cases in ISO2022JP converter

Comment 10

17 years ago
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+
(Assignee)

Updated

17 years ago
Depends on: 104148
(Assignee)

Updated

17 years ago
No longer depends on: 104148
(Assignee)

Updated

17 years ago
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+
(Assignee)

Updated

17 years ago
Blocks: 104060
No longer blocks: 104148

Comment 12

17 years ago
a=asa (on behalf of drivers) for checkin to 0.9.9
Keywords: mozilla0.9.9+
(Assignee)

Comment 13

17 years ago
fixed and checked in.
Status: ASSIGNED → RESOLVED
Last Resolved: 17 years ago
Resolution: --- → FIXED
(Assignee)

Updated

17 years ago
No longer blocks: 104060
(Reporter)

Comment 14

17 years ago
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.