Closed Bug 134053 Opened 24 years ago Closed 23 years ago

utf8 conversion problem in nsString.h

Categories

(MailNews Core :: Internationalization, defect)

x86
Windows XP
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: ji, Assigned: shanjian)

Details

(Keywords: intl)

Attachments

(2 files, 2 obsolete files)

With the current build, surrogate can be displayed correctly on Navigator window, but on mail window, it's displayed as a pair of question mark and square in the subject and displayed as two question marks in mail body. Two testing mails to follow.
Keywords: intl
Status: NEW → ASSIGNED
Shanjian, please help looking at this.
Assignee: nhotta → shanjian
Status: ASSIGNED → NEW
This bug expose 2 problems. One the conversion to utf-8, which is filed as bug 141621. After I applied that patch, imap folder could not be selected any more. Need more investigation.
Status: NEW → ASSIGNED
The 2nd problem is also a UTF8 conversion problem, but exist in nsString2.h. patch will follow.
Summary: Surrogate chars are not displayed correctly in mail subject and body → utf8 conversion problem in nsString.h
Attached patch patch (obsolete) — Splinter Review
Attached patch patch with format change. (obsolete) — Splinter Review
Attachment #82257 - Attachment is obsolete: true
roy, could you r=? scott, could you sr?
Comment on attachment 99708 [details] [diff] [review] patch with format change. sr=scc, but please add a comment pointing the reader to the part of the spec that describes this math, so that one could verify it if they needed to
Attachment #99708 - Flags: superreview+
shanjian: Looks good. Few nits can you define and replace the hex values? + #define PLANE1_BASE 0x00010000 + #define UCS2_REPLACEMENT_CHAR 0xfffd ...... + *mBuffer++ = UCS2_REPLACEMENT_CHAR; I am not familiar with 'u'. Does it compile on other compilers? ucs4 -= 0x10000u;
Attachment #99708 - Attachment is obsolete: true
roy, I modified the patch as you required. u is a standard C feature and it should not be a problem. Please mark r=.
Attachment #99748 - Flags: superreview+
Comment on attachment 99748 [details] [diff] [review] patch take roy suggestion /r=yokoyama thanks, shanjian
Attachment #99748 - Flags: review+
fix checked in.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
This fix introduced a buffer overflow. Please see the fix attached to bug 172700.
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: